Browse Search Popular Register Upload Rules User list Login:
Search:
atan2 mouse control(motor)

Image:
screenshot of the scene

Author: standardtoaster

Group: Default

Filesize: 78.59 kB

Date added: 2009-10-12

Rating: 5.6

Downloads: 1179

Views: 2200

Comments: 4

Ratings: 2

Times favored: 0

Made with: Algodoo before v1.8.5

Tags:

Scene tag

atan2 formula:
Scene.my.atan2=(P1, P2)=>{2 * math.atan((P2(1)-P1(1)) / (((((P2(0)-P1(0))^2) + (P2(1)-P1(1))^2) ^ 0.5) + (P2(0)-P1(0))))}

rad2deg formula:
Scene.my.rad2deg=(n)=>{n < 0 ? {(((math.toFloat(n) * math.toFloat(180)) / math.pi) + 360)} : {((math.toFloat(n) * math.toFloat(180)) / math.pi)}}

Updated!
Last edited at 2009/10/13 01:40:21 by standardtoaster
Please log in to rate this scene
edit
Similar scenes
Title: atan2 mouse control(springs)
Rating: 5.1111
Filesize: 77.08 kB
Downloads: 1181
Comments: 1
Ratings: 3
Date added: 2009/10/12 18:37:07
Made with: Algodoo before v1.8.5
Rating: rated 5.1
download
Title: Forklift(mouse controlled)
Rating: 9.3412
Filesize: 10.29 kB
Downloads: 83277
Comments: 39
Ratings: 95
Date added: 2009/03/24 04:11:48
Made with: Phun
Rating: rated 9.3
download
Title: Apache with Mouse Controlled Canon
Rating: 6.3636
Filesize: 282.61 kB
Downloads: 2197
Comments: 9
Ratings: 5
Date added: 2010/12/22 10:23:30
Made with: Phun
Rating: rated 6.4
download
Title: Mouse control, using springs.
Rating: 5.625
Filesize: 24.15 kB
Downloads: 552
Comments: 0
Ratings: 2
Date added: 2009/09/27 16:48:32
Made with: Algodoo demo
Rating: rated 5.6
download
Title: Mouse controlled crane V2
Rating: 6
Filesize: 32.85 kB
Downloads: 1348
Comments: 3
Ratings: 3
Date added: 2011/01/30 18:04:37
Made with: Algodoo before v1.8.5
Rating: rated 6
download
Title: The BETTER mouse trap (V. 2)
Rating: 6.1
Filesize: 60.18 kB
Downloads: 896
Comments: 3
Ratings: 10
Date added: 2008/06/05 17:13:45
Made with: Phun
Rating: rated 6.1
download
If you want to let the pointer follow full 360° without suddenly spinning into the other direction you have to add a littlebit to your code.
Thanks! I know that I have to edit the code a bit. I'm going to try and work it out later today. If I need help with it I'll send you a message. ;D
Alright :*)
I have fixed and updated the scene. You can now feed it two points and it will calculate the angle between those points in radians.