FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Topics & Contributions
   Simulation, Artificial Life
(Moderator: REAS)
   Bounce
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: Bounce  (Read 452 times)
kmcdonald

suparcomputar WWW
Bounce
« on: Sep 24th, 2003, 8:15am »

http://rpi.edu/~mcdonk/code/bounce/
 
Problems:
The ball is rendered behind the mesh, always, because it is only fill and no stroke.
If the velocity of the ball is too great, it can get temporarily displaced at some constant distance from the y=0 plane.
 
Compromises:
There is some code for which there must be shorthand, (operations on arrays), but I don't know the syntax.
There is only one ball, as opposed to a ball object, and it is described by global variables.
 
Completeness:
The script, in the end, accomplishes what I had the idea for a few days ago: the createion of an arbitrary mesh in three dimensions, and a ball to bounce on it. The hardest part was finding the normal of the mesh as a function of x and z. That took two whole pages in my sketchbook!
 
I have an idea for an instument in p5, it should take a lot less time than writing 3d dynamics code... Thanks for the positive feedback about the Gravity script.
« Last Edit: Jan 13th, 2004, 3:33pm by kmcdonald »  
mKoser

WWW Email
Re: Bounce
« Reply #1 on: Sep 24th, 2003, 12:41pm »

nice one
 
Quote:
The ball is rendered behind the mesh, always, because it is only fill and no stroke.

this render-problem is solved in processing_0060 (availiable for download!) ... that, and the functinality og background() has changed (needs to be called every loop to avoid trails).
 

mikkel crone koser | www.beyondthree.com | http://processing.beyondthree.com
kmcdonald

suparcomputar WWW
Re: Bounce
« Reply #2 on: Sep 24th, 2003, 2:54pm »

Thanks...
 
But this is scaring me a little... I downloaded .60 last night and found the update you were talking about, and read your post this morning. Only minutes ago I exported the code under 60 and there is a significant (perhaps 5-10 fps) framerate decrease.
 
Am I doing something wrong (wouldn't be surprised)?
« Last Edit: Jan 13th, 2004, 3:33pm by kmcdonald »  
toxi

WWW
Re: Bounce
« Reply #3 on: Sep 24th, 2003, 4:30pm »

don't think it's your fault really, there seem to be some "issues" with rev60 and the Sun JVM... if you reload the page the applet should run at full speed. people are looking into this at the moment...
 
apart from that, looks great!!!
 

http://toxi.co.uk/
kmcdonald

suparcomputar WWW
Re: Bounce
« Reply #4 on: Sep 24th, 2003, 8:52pm »

Wow... that is crazy. It does run at the same speed if you refresh it. Looking forward to beta... ^_^ Thanks for the feedback!
 
Pages: 1 

« Previous topic | Next topic »