View Single Post
Old 23rd March 2007, 15:37   #2
Warrior of the Light
Forum King
 
Warrior of the Light's Avatar
 
Join Date: Aug 2002
Location: The Netherlands
Posts: 4,095
Drop the equal(min( thingey and use the above() function instead; that would make (working sample):

code:
init
n=h*2+2
//+2 because you want just as many lines as you have pixels, not points.
//(lines=points-1)

frame
p=0
//needed for the skip() function

point
skip=equal(p,ceil(n*.5)+1);
//remove the line between the two scopes.
//this line can also be used if n changes, but not if the both halfs don't have the same amount of points.

y=if(below(i,.5), //seperate the line in two equal parts: ---|---
i*4-1, //define y for the first part (left)
i*4-3); //define y for the second part (right)

x=below(i,.5)*getspec(i*2,0,1)*.5-.5;
//define x for the first part (left)
x=if(above(i,.5),getspec(i*2-1,0,2)*.5+.5,x);
//define x for the second part (right)

if you don't understand what I'm doing with y, just enter some values for i and see what it does.

What I'm basically doing with getspec() in x is multiplying i by two, and then I either use the first half (0 to 0.5 of i, now 0 to 1), or the second half (>0.5 to 1 of i; now >1 to 2)

I hope this helps

Jesus loves you [yes, you] so much, he even died for you so that you will not need to die, but live forever

Last edited by Warrior of the Light; 23rd March 2007 at 15:54.
Warrior of the Light is offline   Reply With Quote