We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › New and Improved.....            not
Page Index Toggle Pages: 1
New and Improved.....            not (Read 1329 times)
New and Improved.....            not
Aug 8th, 2007, 12:16am
 
I recently came across a project
http://www.flight404.com/p5/magnets3_3D/
with source code here
http://www.flight404.com/p5/magnets3_3D/magnets_3_3D.pde

In attempting to update the code to a newer version of processing and I currently have the following changes:

//////////////////////////////////

I replaced void loop() with void draw()
I replaced push with pushMatrix();
I replaced pop with popMatrix();

I added import processing.opengl.*; at the top
I added size(xSize, ySize, OPENGL); to void setup()

I added PImage myField; and PImage myFieldMask; to the top

I took out the void brightToAlpha() code

I took out
   myField = loadImage("field.gif");
   brightToAlpha(myField);
from void setup() and put
   myField = loadImage("field.jpg");
   myFieldMask = loadImage("fieldMask.jpg");
   myField.mask(myFieldMask);
in its place

//////////////////////////////////

Does anyone have any suggestions on how to make the code run correctly? Thank you so much for your help. I'm very excited to learn all I can.

-alex
Re: New and Improved.....            not
Reply #1 - Aug 12th, 2007, 4:15am
 
not sure what you want? whats wrong then? does it compile? do you see anything on screen? what are the errors in case it does not compile ?!
Re: New and Improved.....            not
Reply #2 - Aug 27th, 2007, 1:36pm
 
I tried it also but could not run it.
Have you done more or got a better version ?

alphachapmtl

PS, I found some answers at the bottom of this webpage:

http://www.flight404.com/blog/?cat=1&paged=2

or here:

http://www.flight404.com/blog/?p=71
Re: New and Improved.....       &nb
Reply #3 - Sep 11th, 2007, 7:50pm
 
Did you ever make any progress with this?  I've just recently begun an attempt to update this old code as well.
Re: New and Improved.....            not
Reply #4 - Sep 12th, 2007, 7:41am
 
check this site:  http://www.flight404.com/version7/
Re: New and Improved.....       &nb
Reply #5 - Sep 12th, 2007, 12:30pm
 
I understand nothing about the code (not yet),
but the stuffs on the website are amazing!

'really looking foward to learn how those kind of things are possible....
Page Index Toggle Pages: 1