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_
   Programming Questions & Help
   Programs
(Moderators: fry, REAS)
   Star Nusery
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: Star Nusery  (Read 404 times)
jen

Email
Star Nusery
« on: Apr 22nd, 2004, 1:42am »

I was very impressed by this example of processing in the exhibtion part of the website, I have been playing with it trying to get the same sort of visual effect in reaction to A int reuturned from  a database.  
 
for example if the number returned is with the rage 1-10 and I get an 8 I want there to be a larger "burst" of stars than if I was returned a four . I have been trying  to get the code to do this so far by attempting to save a more basic sense of the ersult ( a bright circle ) then passing it as video put it dosnt work  
 
As you might be able to tell from other posts I kinda suck at maths so I know what I want to do but I dont really no how to do it ( isnt that always the case )  
 
 
cheers
 
 
jennie
 
mKoser

WWW Email
Re: Star Nusery
« Reply #1 on: Apr 22nd, 2004, 3:38pm »

it would be alot easier to help out if you posted the code you are having problems with...
 

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

WWW
Re: Star Nusery
« Reply #2 on: Apr 22nd, 2004, 10:01pm »

Hmm hi, I'm ryan. i wrote the star nursery sketch. It seems like it would be pretty hard to get the star code as it is to work with that kind of input.. Right now it reacts to light and dark in an imput image. If an area changes from light to dark then the stars grow, and touch each other, causing them to light up and connect to other stars. So maybe that's the burst you're talking about.
 
I think maybe the best way to do what you want is instead of generating images to input into the star code that's already there, you could just change the code so that stars die after a certain age and then are created based on your number..
 
jen

Email
Re: Star Nusery
« Reply #3 on: Apr 24th, 2004, 12:25am »

Thhanks for the tip , I have been trying to d othat but I dont get the code that well wI cant seem to make any stars at all If you have taime could you maybey whip up a simple "burst" So I can uderstand where to make the alterations to suit what I need by the way where in  so cal are you based?
 
cheers jen
 
skloopy

WWW
Re: Star Nusery
« Reply #4 on: Apr 25th, 2004, 3:03am »

Well I can't go too in depth cuz of this other project im working on, but if you want to make more stars with the code that's there, you just have say
 
Code:
stars[nStars] = new Star(nStars, random(width), random(height), random(-5, 5), random(-5, 5));

 
and then increment the number of stars like this
 
Code:
nStars++;

 
If you're gonna be making them and deleting them then you should probably revamp the code so that when you delete one it just shifts all of the stars after it up one in the array with System.arraycopy(stars,IndexOfStarYouWantToErase+1,stars,IndexOfStarYouW antToErase,nStars-(IndexOfStarYouWantToErase+1)); and then nStars--;
 
I think that should work.. There might be errors..
 
Um I'm in LA by the way, in VeniceBeach right now..
 
ryan
 
jen

Email
Re: Star Nusery
« Reply #5 on: Apr 25th, 2004, 8:40pm »

excellent thanks for the help. I will play with it later tonight. Just curious about your location cause I am an exchange student from NZ studying at UCSD so was being nosey ,always intreasted in meeting people who work in the areas I want to ( not being stalkerish just  playing the forgien card )
 
cheers
 
jen
 
jen

Email
Re: Star Nusery
« Reply #6 on: Apr 26th, 2004, 9:17pm »

replying to my self with yet another question..
 
 
my current problem is that the star picture isnt displayed the  entire code that I am using is at this address http://sdcc13.ucsd.edu/~jstehhou/oneStar ( its to long to post), ( there is also a sound out put associated with the 'match' value, hence the sonia code it is also going to be taking streaming gps data via the nmea prtocol) If you can hold odwn the tilde key (~) you can see the bounding circles but the star gif isnt being displayed. it is being loaded though, is how I have adjusted the diameter the right way to go about things?
 
 
cheers
« Last Edit: Apr 26th, 2004, 10:03pm by jen »  
Pages: 1 

« Previous topic | Next topic »