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_
   Discussion
   General Processing Discussion
(Moderators: fry, REAS)
   Processing tennis
« Previous topic | Next topic »

Pages: 1 2 3 4 
   Author  Topic: Processing tennis  (Read 2104 times)
mKoser

WWW Email
Re: Processing tennis
« Reply #30 on: Aug 29th, 2003, 2:41pm »

go go go!
 

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

170825270170825270koeniedesign WWW Email
Re: Processing tennis
« Reply #31 on: Aug 29th, 2003, 2:43pm »

Ok, benelek, why don't you post a starter for the second round?
 
Koenie
 

http://koeniedesign.com
benelek

35160983516098 WWW Email
Re: Processing tennis
« Reply #32 on: Aug 30th, 2003, 3:19am »

round 2 --> 2 variables.
ready, set, go!
 
Code:
//Processing tennis
// round 1 by Koenie
// Martin  
// mKoser  
// scrap-pile  
// 53  
// arielm  
// benelek  
// toxi  
// zevan  
// round 2 by benelek
 
float waveIncr=0.01f;
float rateOfChange=0.001f;
 
void setup() {
  size(350,200);
  background(255,255,240);
  stroke(0,0,150);
}
 
void loop() {
  translate(width/2,height/2);
  for(int y=-height/2; y<height/2; y+=2) {
    line(0,y,1000*waveIncr*waveIncr*sin(y*waveIncr),y);
  }
  waveIncr+=rateOfChange;
  if(waveIncr>0.20) {
    waveIncr=0.20f;
    rateOfChange=random(-0.0008,-0.0003);
  } else if(waveIncr<0.05) {
    waveIncr=0.05f;
    rateOfChange=random(0.002,0.008);
  }
}
 
Koenie

170825270170825270koeniedesign WWW Email
Re: Processing tennis
« Reply #33 on: Aug 30th, 2003, 12:48pm »

Code:

//Processing tennis  
// round 1 by Koenie  
// Martin  
// mKoser  
// scrap-pile  
// 53    
// arielm  
// benelek  
// toxi  
// zevan  
// round 2 by benelek
// Koenie
 
float waveIncr=0.01f;  
float rateOfChange=0.001f;  
 
void setup() {  
  size(350,200);  
  background(255,255,240);  
  stroke(0,0,150);
}  
 
void loop() {  
  translate(width/1.5,height/1.5);  
  rotateY(PI/2);
  for(int y=-height; y<height; y+=1) {  
    line(0,y,1000*waveIncr*waveIncr*sin(y*waveIncr),y, 1000*waveIncr*waveIncr*sin(y*waveIncr), y);  
  }  
  waveIncr+=rateOfChange;  
  if(waveIncr>0.20) {  
    waveIncr=0.20f;  
    rateOfChange=random(-0.0008,-0.0003);  
  } else if(waveIncr<0.05) {  
    waveIncr=0.05f;  
    rateOfChange=random(0.002,0.008);  
  }  
}
 

http://koeniedesign.com
LigaMainz

WWW
Re: Processing tennis
« Reply #34 on: Aug 30th, 2003, 1:58pm »

very cool idea indeed:
my answer:
(hmm, what do i have to write, that this is shown as code?)
(ahhh, now i found it )
 
 
Code:

 
//Processing tennis  
// round 1 by Koenie  
// Martin    
// mKoser    
// scrap-pile    
// 53    
// arielm    
// benelek    
// toxi    
// zevan    
// round 2 by benelek  
// Koenie
// LigaMainz
  
float waveIncr=0.01f;  
float rateOfChange=0.001f;  
  
void setup() {  
  size(350,200);  
//  noBackground();  
  background(255,255,240);  
  stroke(0,0,150);  
}  
  
void loop() {  
  translate(width/1.5,height/1.5);  
  rotateY((waveIncr*waveIncr));
  for(int y=-height; y<height; y+=1) {  
    rotateZ(waveIncr);
    line(0,y,1000*waveIncr*waveIncr*sin(y*waveIncr),y, 1000*waveIncr*waveIncr*sin(y*waveIncr), y);  
  }  
  waveIncr+=rateOfChange;  
  if(waveIncr>0.20) {  
    waveIncr=0.20f;  
    rateOfChange=random(-0.0008,-0.0003);  
  } else if(waveIncr<0.05) {  
    waveIncr=0.05f;  
    rateOfChange=random(0.002,0.008);  
  }  
}
 

 
« Last Edit: Aug 30th, 2003, 2:07pm by LigaMainz »  
arielm

WWW
Re: Processing tennis
« Reply #35 on: Aug 30th, 2003, 7:28pm »

Code:
//Processing tennis    
// round 1 by Koenie    
// Martin    
// mKoser
// scrap-pile
// 53  
// arielm    
// benelek
// toxi    
// zevan
// round 2 by benelek
// Koenie
// LigaMainz
// arielm
 
float h = 0.0;  
   
void setup()
{  
  size(350, 200);
  background(255, 255, 240);  
  stroke(0, 0, 150);
  framerate(25);
}  
   
void loop()
{
  translate(0, 100);
  beginShape(LINE_STRIP);
  for (int x = 0; x <= 350.0; x += 6.0)
  {
    vertex(x, 50 * cos(h) * sin(radians(x)));
    vertex(x, 50 * sin(h) * cos(radians(x)));
  }
  endShape();
  h += radians(3.0);
}
 

Ariel Malka | www.chronotext.org
53

i_253 WWW Email
Re: Processing tennis
« Reply #36 on: Aug 30th, 2003, 9:25pm »

on Aug 30th, 2003, 1:58pm, LigaMainz wrote:

 
 
Code:

 
//Processing tennis  
// round 1 by Koenie  
// Martin  
// mKoser  
// scrap-pile  
// 53    
// arielm  
// benelek  
// toxi  
// zevan  
// round 2 by benelek  
// Koenie
// LigaMainz
// 53
// arielm
 
float waveIncr=0.01f;  
float rateOfChange=0.001f;  
 
void setup() {  
  size(350,200);  
  background(255,255,240);  
  stroke(0,0,150);  
}  
 
void loop() {  
  translate(width/2,height/2);    
  for(int y=-height; y<height; y+=1) {  
    rotateY(waveIncr);
     
    for (int i=y; i<0; i+=2){
 stroke(150, -i*8, -i*4);
 point(i,  
     y + i * ((1000*waveIncr*waveIncr*sin(y*waveIncr)-y)/y),
     
     1000*waveIncr*waveIncr*sin(y*waveIncr) + i *  
  (( y- 1000*waveIncr*waveIncr*sin(y*waveIncr) )/y)
 );    
    } //_for    
     
    for (int i=0; i<y; i+=2){
 stroke(i*6, i*3, 150);
 point(i,  
     y + i * ((1000*waveIncr*waveIncr*sin(y*waveIncr)-y)/y),
     
     1000*waveIncr*waveIncr*sin(y*waveIncr) + i *  
  (( y- 1000*waveIncr*waveIncr*sin(y*waveIncr) )/y)
 );
    } // _for      
  } // _for (int y=-height; y<height; y+=1)
   
  waveIncr+=rateOfChange;  
  if(waveIncr>0.2) {  
    waveIncr=0.2f;  
    rateOfChange=random(-0.0018,-0.0013);  
  } else if(waveIncr<0.05) {  
    waveIncr=0.05f;  
    rateOfChange=random(0.002, 0.008);  
  }  
}  
 

 

 
mKoser

WWW Email
Re: Processing tennis
« Reply #37 on: Aug 30th, 2003, 11:09pm »

hmmmm...  i kinda ended up using TOO many variables (am I disqualified now?)
 
Code:

//Processing tennis
// round 1 by Koenie
// Martin
// mKoser
// scrap-pile
// 53
// arielm
// benelek
// toxi
// zevan
// round 2 by benelek
// Koenie
// LigaMainz
// arielm
// mKoser ---> yeah i know, i used TOO many variables!
 
float h = 0f;
float s = 0.05;
float ts = s;
float m = 4f;
 
void setup()
{
  size(360, 360);
  background(255, 255, 240);
  stroke(0, 0, 150);
  noFill();
}
 
void loop()
{
  translate(35, 20);
   
  // shape 1
  push();
  translate(100, 0);
  rotateZ(-0.3);
  beginShape(POLYGON);
  for (int y = 40; y < 310.0; y += 10.0)
  {
    curveVertex(-20 * cos(h) * sin(radians(y)), y);
    curveVertex(-80 * cos(h) * sin(radians(y)), y);
    curveVertex(0, 180);
    curveVertex(0, 180);
    curveVertex(120 * sin(h) * cos(radians(y)), y);
    curveVertex(20 * sin(h) * cos(radians(y)), y);
  }
  endShape();
  pop();
   
  // shape 2
  push();
  translate(200, 0);  
  rotateZ(0.3);
  beginShape(POLYGON);
  for (int y = 40; y < 310.0; y += 10.0)
  {
    curveVertex(-20 * cos(-h) * sin(radians(-y)), y);
    curveVertex(-80 * cos(-h) * sin(radians(-y)), y);
    curveVertex(0, 180);
    curveVertex(0, 180);
    curveVertex(120 * sin(-h) * cos(radians(-y)), y);
    curveVertex(20 * sin(-h) * cos(radians(-y)), y);
  }
  endShape();
  pop();
 
  if(ts > m){
    ts = -s;
    m = random(3.5, 7.5);
  }    
   
  ts += s;
  h += radians(ts);
}
 

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

WWW Email
Re: Processing tennis
« Reply #38 on: Aug 31st, 2003, 1:23pm »

Really nice applets shown here, I like the concept, it's fun ! It reminded me a kind of challenge which was very popular in a french computer zine called "St-Magasine" some years ago. It was targeted for the Atari St platform, using a language called GFA-Basic and so it was called "GFA Punch". The concept was extremely simple : Do whatever you want in 20 lines (1 instruction per line). This challenge led to some amazing stuff, including little games, some great demo effects and all kinds of things.
I thought maybe It could be an interesting idea to have this kind of limitation for the processing tennis, maybe "Processing Punch" ?
 

http://v3ga.net
mKoser

WWW Email
Re: Processing tennis
« Reply #39 on: Aug 31st, 2003, 2:29pm »

...and again, something along the lines of limited competitions: http://www.the5k.org/  
make something that runs within a browser, but limited to 5k..! (I love that website!)
 
----
 
i like your suggestion v3ga, 20 lines of code... maybe this could be the rule for  
Processing Tennis Round 3
 

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

170825270170825270koeniedesign WWW Email
Re: Processing tennis
« Reply #40 on: Aug 31st, 2003, 4:05pm »

Maybe we can make a new thread for Processing Punch, and have 2 games.
 
Koenie
 

http://koeniedesign.com
toxi

WWW
Re: Processing tennis
« Reply #41 on: Sep 1st, 2003, 1:26pm »

slightly offtopic, but maybe someone else around here remembers this whole notion of working with extreme restrictions from the demo scene? the main limitation there is usually filesize and historically, the always limiting CPU power... but limitation is always seen as a means to improvise and through that arrive at incredible solutions.
 
P5 applets are pretty small, considering they have their own engine included, however for some real extreme programming check these links (sorry non-java & windows only!):
 
256 bytes:
------------
Tube by Baze
CSilla by SHR/MoleCoola
 
64 KBytes:
-------------
these 2 have their own softsynth code (incl. voice synthesis) built-in too:
poem to a horse by farbrausch
candytron* by farbrausch
 
heaven 7even by exceed (realtime raytracing)
 
*note: excuse the "teenage kicks" visuals, i admire it more from a tech POV!
 
more of this and similar stuff can be found here: http://www.monostep.org/
 
over & out!
« Last Edit: Sep 1st, 2003, 1:28pm by toxi »  

http://toxi.co.uk/
v3ga

WWW Email
Re: Processing tennis
« Reply #42 on: Sep 1st, 2003, 8:01pm »

Nice selecta Toxi
 
The limitation in numbers of lines could be applied in such a way that lines like * void  setup() * and * void loop() * (including the {}) are not counted as effective lines. Well, that's a suggestion !
 

http://v3ga.net
benelek

35160983516098 WWW Email
Re: Processing tennis
« Reply #43 on: Sep 2nd, 2003, 12:28am »

i've been thinking we could also extend the p5 tennis we've been playing to no variables - outside those already existing within p5. how many int[] values are there in the pixels array?
 
vent

WWW
Re: Processing tennis
« Reply #44 on: Sep 3rd, 2003, 9:58pm »

So who's going to start the next round?
 

http://www.shapevent.com/
Pages: 1 2 3 4 

« Previous topic | Next topic »