Question
Finding and storing x and y coordinates
I need to somehow store a given set of x & y coordinates into a def. When I draw a path to a certain point, the program needs to store that point in a def to use it later on. For instance, the program will be deciding whether to draw a line to the left or to the right, depending on whether or not it's x value is greater than (to the right of) the center of the page, or less than (to the left of) the center.
the logic is as such:
{
Draw a circle with circleX and circleY as the center
Draw a line from the edge of the circle out 10 points
Now after you draw this line, where are you (what is your x,y)?
Store those x,y coordinates into defs named previousX, and previousY.
if previousX is greater than or equal to circleX, then draw a
line to the right. If not, then draw a line to the left.
}
I have been using currentpoint with success when creating a new origin point for arcs and whatnot, but something like
/previousPoint currentpoint def
just doesn't work. I also cannot compare currentpoint with circleX and get any helpful return.
Anyone know a good way to "get" the x and or y at the current point?
the logic is as such:
{
Draw a circle with circleX and circleY as the center
Draw a line from the edge of the circle out 10 points
Now after you draw this line, where are you (what is your x,y)?
Store those x,y coordinates into defs named previousX, and previousY.
if previousX is greater than or equal to circleX, then draw a
line to the right. If not, then draw a line to the left.
}
I have been using currentpoint with success when creating a new origin point for arcs and whatnot, but something like
/previousPoint currentpoint def
just doesn't work. I also cannot compare currentpoint with circleX and get any helpful return.
Anyone know a good way to "get" the x and or y at the current point?
