Bots and Simulations > Bot Tavern

Trigonometry Mathematics

(1/2) > >>

spike43884:
I want to use some trigonometry in one of my bots, but I'm not familiar with radians. Plus I've not used db in ages.
So i'll outline my usage below:
3 bots connected via 2 ties in a line going bot A, bot B, bot C.
Bot (A) see's an enemy and gives info about which direction from itself the enemy is, and how far away.
Bot (B) receives this info, and performs a trigonometric calculation to fire at the enemy (without using eyes :D). It then gives information about which direction from itself the enemy is, and how far away.
Bot (C) receives bot B's info and performs a trigonometric calculation to fire at the enemy (without using eyes :D).

Numsgil:

--- Quote from: spike43884 on April 07, 2016, 12:31:09 PM ---I want to use some trigonometry in one of my bots, but I'm not familiar with radians.

--- End quote ---

Start here, then read this.  DB angles are radians * 200 basically.

spike43884:

--- Quote from: Numsgil on April 07, 2016, 06:49:00 PM ---
--- Quote from: spike43884 on April 07, 2016, 12:31:09 PM ---I want to use some trigonometry in one of my bots, but I'm not familiar with radians.

--- End quote ---

Start here, then read this.  DB angles are radians * 200 basically.

--- End quote ---
The length of a tie and the method of telling how far away something is in an eye is the same as well right?

Numsgil:
Distances in eyes are somewhat complicated.  The article on eyes has a section on it.

Then length of a tie is  also complicated.  For multibots, your best bet is to get the two bots approximately the right distance, form the tie, wait for it to harden, then set the stiffness to 100.

spike43884:

--- Quote from: Numsgil on April 08, 2016, 06:53:03 PM ---Distances in eyes are somewhat complicated.  The article on eyes has a section on it.

Then length of a tie is  also complicated.  For multibots, your best bet is to get the two bots approximately the right distance, form the tie, wait for it to harden, then set the stiffness to 100.

--- End quote ---
I noticed .tielen isn't in the ties sysvar section.
Has it become deprecated? (I rather liked .tielen & .tieang)

I might hold off till one of DB2's successors comes out for using trigonometry then, hopefully some more -universal- distance telling will evolve then...

Navigation

[0] Message Index

[#] Next page

Go to full version