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: 490

Views: 436

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: 2167
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: 2585
Comments: 1
Ratings: 1
Date added: 2014/06/25 00:25:14
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: do you know pororo
Rating: 5
Filesize: 437.47 kB
Downloads: 902
Comments: 8
Ratings: 1
Date added: 2017/06/29 20:04:24
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: The flying Tails
Rating: 5
Filesize: 206.35 kB
Downloads: 1004
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: 415
Comments: 2
Ratings: 8
Date added: 2008/06/30 18:50:05
Made with: Phun
Rating: rated 7.4
download
Title: Coin Toss
Rating: 5.625
Filesize: 216.4 kB
Downloads: 718
Comments: 3
Ratings: 2
Date added: 2012/12/17 03:37:24
Made with: Algodoo v2.0.2 Edu
Rating: rated 5.6
download
Responses to this scene
show list
Title: Coin Toss
Rating: 5.625
Filesize: 216.4 kB
Downloads: 718
Comments: 3
Ratings: 2
Date added: 2012/12/17 03:37:24
Made with: Algodoo v2.0.2 Edu
Rating: rated 5.6
download
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?