Sg2.9
Difference between segment an...
Recent RSS
Difference between segment and curve
From:  Austin
Date:  25. August 2010, 08:13

Hi all,

I'm wondering what the difference between segments and curves is. Say, myPath is some selected path then both

for (var i=0; i < myPath.segments.length; i++) {
print(myPath.segments[i]);
}

and

for (var i=0; i < myPath.curves.length; i++) {
print(myPath.curves[i]);
}

yield similar console output. So what's the preferred way to access the individual pieces of a path if I want to compute some stuff while traversing each piece parametrically? How can I tell that some piece is merely a straight line (other than that curve.handle1 apparently returns the origin)?

Many thanks for your help,
Austin

Scripts
26.04.12, 16:05
19.04.12, 16:54
07.04.12, 16:17
05.04.12, 00:49
15.03.12, 13:02
14.02.12, 19:00
Posts
21.05.12, 22:40
20.05.12, 20:22
19.05.12, 21:38
19.05.12, 13:43
15.05.12, 02:38
15.05.12, 01:51
Script of the Moment
Boxes Flow 19.04.12
Donation

If you use Scriptographer regularly or for commercial purposes, please consider making a donation via PayPal:

Thank you!