Highlighted

Corona infographic

New Here ,
Mar 29, 2020

Copy link to clipboard

Copied

Is it possible to achieve this infographic by Amy expression? With the balls colliding?

 

https://www.washingtonpost.com/graphics/2020/world/corona-simulator/

 

 

TOPICS
Expressions, Scripting

Views

42

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Corona infographic

New Here ,
Mar 29, 2020

Copy link to clipboard

Copied

Is it possible to achieve this infographic by Amy expression? With the balls colliding?

 

https://www.washingtonpost.com/graphics/2020/world/corona-simulator/

 

 

TOPICS
Expressions, Scripting

Views

43

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Mar 29, 2020 0
Guide ,
Mar 29, 2020

Copy link to clipboard

Copied

Sure.

Each ball knows it's own position and can read out the position of the other balls. So you can create an collision detection. It get's easier, if the balls are in a fixed order, so you only need to know the position of the next bal, or previous one - from whatever side you look at it. 

To move the ball, you can use the linear function which just takes the current position as starting point and some value larger then this as end point.

 

Check out Dan Ebberts site for the collision detection:

https://www.motionscript.com/design-guide/collision.html

 

A basic scetch could be:

 

if (previousBall.transform.position == (myPosition + perimeter)){

    linear (...);

} else {

    value;

};

 

*Martin

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 29, 2020 0