Browse Search Popular Register Upload Rules User list Login:
Search:
heads and tails.

Image:
screenshot of the scene

Author: faytree

Group: Default

Filesize: 123.98 kB

Date added: 2012-12-16

Rating: 5.5

Downloads: 531

Views: 537

Comments: 6

Ratings: 2

Times favored: 0

Made with: Algodoo v2.0.2

Tags:

Scene tag

try to throw/"flip" the coin .It flips realisticlly just like a real flipping a coin.
Please log in to rate this scene
edit
Similar scenes
Title: HEADS AND TAILS PINBALL MACHINE
Rating: 5
Filesize: 0.9 MB
Downloads: 2300
Comments: 0
Ratings: 1
Date added: 2012/10/18 06:26:53
Made with: Algodoo v2.0.2
Rating: rated 5
download
Title: Sonic.exe
Rating: 5
Filesize: 265.91 kB
Downloads: 2794
Comments: 1
Ratings: 1
Date added: 2014/06/25 00:25:14
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: marble race for tails
Rating: 5
Filesize: 232.35 kB
Downloads: 1254
Comments: 3
Ratings: 1
Date added: 2014/01/19 21:58:50
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: The flying Tails
Rating: 5
Filesize: 206.35 kB
Downloads: 1146
Comments: 0
Ratings: 1
Date added: 2016/11/19 01:44:57
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Skeleton Head Update
Rating: 7.375
Filesize: 82.89 kB
Downloads: 538
Comments: 2
Ratings: 8
Date added: 2008/06/30 18:50:05
Made with: Phun
Rating: rated 7.4
download
Title: Tails Character
Rating: 5
Filesize: 104.94 kB
Downloads: 657
Comments: 1
Ratings: 1
Date added: 2013/03/10 19:38:33
Made with: Algodoo before v1.8.5
Rating: rated 5
download
Responses to this scene:
Title Author Rating Downloads Comments Date added
Coin Toss s_noonan 5.6 (2 votes) 813 3 2012/12/17 03:37:24
show grid
Angle is in units of Radians, not degrees. The scene seems to work, but it's not flipping heads and tails every 180 degrees as you probably thought it would, based on your code.
can you give me a scene example?
Stick an axle in the middle of your coin, and make it rotate slowly. You will see that the coin doesn't flip every 180 degrees. If you want to use degrees, the conversion is Deg = Rads * 180/pi.
This works:
{
angle > math.pi ? {scene.my.tails = 1} : {};
angle > 0 ? {scene.my.tails = 0} : {};
1.0
}

Since there are 2pi radians in 360 degrees, this flips each time the angle changes positive and negative with each rotation.
actually, this is simpler and it works just as well:
{
angle < 0 ? {scene.my.tails = 1} : {};
angle > 0 ? {scene.my.tails = 0} : {};
1.0
}

It works because in Algodoo, a complete rotation goes from zero to +pi (3.14) in the first 180 degrees, and -pi (-3.14) in the second 180 degrees, back to zero. So, you only need to check if the angle is positive or negative in order to make something happen twice per rotation!

EDIT: After thinking about it, I realized that the script can be made even simpler!

{
angle < 0 ? {scene.my.tails = 1} : {scene.my.tails = 0};
1.0
}
Last edited at 2012/12/17 01:01:01 by Xray
Shoud you do phun for tails?