Message Boards Message Boards

Demo video: Roller coaster

Posted 9 years ago

Background

I first encountered Mathematica when version 7 was being released. One video stands out in my memory (besides the feature list) as convincing me to buy a copy. I've decided to start making some quick demo videos. The code is toy-ish, but as a kid these were the kinds of things I wanted to get my computer to do. The ability to contribute as a programmer to science, technology, and business came much later. I want there to be more programmers in the world, so maybe these types of demos can help convince people to start programming with Wolfram as their first language. There aren't as many job postings for Mathematica proficiency yet as I'd like, but if you learn a language as big as the Wolfram Language, you should be able to handle most programming jobs pretty easily.


Roller coaster

Video

pts = {{-1, 2}, {0, 0}, {1, 1}};

p = v = 0; LocatorPane[Dynamic@pts, 
 Dynamic[f = BSplineFunction@pts; 
  p += (v = .995 (v += -.001 Normalize[f'@p][[2]]))/Norm[f'@p]; 
  If[p >= 1 || v < 0, p = v = 0]; 
  Graphics[{BSplineCurve@pts, Red, PointSize@.05, Point@f@p}, 
   PlotRange -> 5]], LocatorAutoCreate -> All]
POSTED BY: Michael Hale
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract