# Darwinbots Forum

## Bots and Simulations => Bot Tavern => Topic started by: spike43884 on April 07, 2016, 12:31:09 PM

Title: Trigonometry Mathematics
Post by: 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. 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).

Title: Re: Trigonometry Mathematics
Post by: Numsgil on April 07, 2016, 06:49:00 PM
I want to use some trigonometry in one of my bots, but I'm not familiar with radians.

Title: Re: Trigonometry Mathematics
Post by: spike43884 on April 08, 2016, 05:36:23 AM
I want to use some trigonometry in one of my bots, but I'm not familiar with radians.

The length of a tie and the method of telling how far away something is in an eye is the same as well right?
Title: Re: Trigonometry Mathematics
Post by: Numsgil on April 08, 2016, 06:53:03 PM
Distances in eyes are somewhat complicated.  The article on eyes (http://wiki.darwinbots.com/w/Eye) 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.
Title: Re: Trigonometry Mathematics
Post by: spike43884 on April 09, 2016, 05:34:47 AM
Distances in eyes are somewhat complicated.  The article on eyes (http://wiki.darwinbots.com/w/Eye) 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.
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...
Title: Re: Trigonometry Mathematics
Post by: Numsgil on April 09, 2016, 07:12:52 PM
.tielen (http://wiki.darwinbots.com/w/.tielen).
Title: Re: Trigonometry Mathematics
Post by: spike43884 on April 10, 2016, 01:38:37 PM
.tielen (http://wiki.darwinbots.com/w/.tielen).
Yeah look on the sysvar page tie commands subsection.
It doesn't list tielen
Title: Re: Trigonometry Mathematics
Post by: Shadowgod2 on April 10, 2016, 02:42:53 PM
yea sometimes you just need the full sysvar page to find it. it's not under the ties subsection but in the multibot subsection
Title: Re: Trigonometry Mathematics
Post by: spike43884 on April 17, 2016, 02:27:43 PM
yea sometimes you just need the full sysvar page to find it. it's not under the ties subsection but in the multibot subsection
To be honest, the multibot subsection only makes sense for the .multi command, which with only that command not being suitable for a tie subsection, it would be more sensible to create a .miscellaneous subsection which could also contain .pain or other 'unique' uses.