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 › newbe Processing Vs Design By Numbers syntax
Page Index Toggle Pages: 1
newbe Processing Vs Design By Numbers syntax (Read 555 times)
newbe Processing Vs Design By Numbers syntax
Sep 5th, 2005, 1:40am
 
Hi

I am trying to write a simple paint programme that I learnt in DBN- The comparison section for those who have used DBN is very good! But I dont know where to beigin with this:

//DBN paint programme code
Paper 0
Pen 100
Set H0 <Mouse 1>
Set V0 <Mouse 2>

Forever
{
Set H1 <Mouse 1>
Set V1 <Mouse 2>
Line H0 V0 H1 V1

Set H0 H1
Set V0 V1
}

This is what I placed in processssing....

//Processing paint programme code
void setup(){
stroke (255);

HO = get((MouseX);
V0 = get(( MouseY);



H1 = get((MouseX);
V1 = get((MouseY);

void draw() {
Line (H0, V0, H1, V1);

Set (H0, H1);
Set (V0, V1);
}


If there anyone that has used DBN and done this code in processing you be helping me towards code enlightment ;)


Thanks!
Re: newbe Processing Vs Design By Numbers syntax
Reply #1 - Sep 5th, 2005, 8:30am
 
This works great for me..

Code:

//Processing paint programme code
void setup(){
size(300,300);
background(0); // setting the background to black once
stroke (255); // setting the stroke color of the line
}

void draw() {
line (pmouseX,pmouseY,mouseX,mouseY);
}


enjoy

-seltar

Page Index Toggle Pages: 1