Animating in Mathematica: Creating a Bouncing Point in a Box Tutorial

  • Context: Mathematica 
  • Thread starter Thread starter rbnphlp
  • Start date Start date
  • Tags Tags
    Mathematica
Click For Summary
SUMMARY

The discussion focuses on creating an animation in Mathematica that simulates a point bouncing up and down within a defined box. The solution provided utilizes the Animate and Graphics functions, specifically the code snippet: Animate[Graphics[Circle[{0, Sin[x]}, 1], PlotRange -> {{-2, 2}, {-3, 3}}], {x, 0, 10}]. This effectively animates a circle whose vertical position is determined by the sine function, demonstrating a smooth oscillation within the specified plot range.

PREREQUISITES
  • Familiarity with Mathematica programming language
  • Understanding of basic animation concepts
  • Knowledge of the Graphics function in Mathematica
  • Basic trigonometry, specifically the sine function
NEXT STEPS
  • Explore advanced animation techniques in Mathematica
  • Learn about the Manipulate function for interactive graphics
  • Investigate the use of dynamic variables in Mathematica
  • Study the impact of different mathematical functions on animations
USEFUL FOR

This discussion is beneficial for Mathematica users, educators in mathematics or computer science, and anyone interested in creating dynamic visualizations through programming.

rbnphlp
Messages
53
Reaction score
0
Does anyone know how would I go about making a point , bounce up and down in a box in mathematica?
Would greatly apperciate for any help..
Thanks
 
Physics news on Phys.org
Code:
Animate[Graphics[Circle[{0, Sin[x]}, 1], 
  PlotRange -> {{-2, 2}, {-3, 3}}], {x, 0, 10}]
 
kai_sikorski said:
Code:
Animate[Graphics[Circle[{0, Sin[x]}, 1], 
  PlotRange -> {{-2, 2}, {-3, 3}}], {x, 0, 10}]

Cheers dude
 

Similar threads

  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 0 ·
Replies
0
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K