You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi all: I am learning PlotDevice. I would like to create some custom shapes (Bezier paths) that I can reuse, rotate, translate, etc. I would have thought that in each of the two examples below I had done just that. I can later draw the paths using plot(), but the rotate() command (and others) don't seem to work as expected. What am I doing wrong? How can I do this correctly?
background(1)
fill('blue')
r = rect(100, 100, 50, 50, plot = False) # Create a path (??)
plot(r)
rotate(degrees=10)
plot(r) # Path not rotated before plotting
reset()
fill('red')
with bezier(10, 10, plot = False) as path: # Create a path (??)
rect(150, 150, 50, 50) # won't be drawn
rotate(degrees=10)
plot(path) # Not rotated before plotting```
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all: I am learning PlotDevice. I would like to create some custom shapes (Bezier paths) that I can reuse, rotate, translate, etc. I would have thought that in each of the two examples below I had done just that. I can later draw the paths using plot(), but the rotate() command (and others) don't seem to work as expected. What am I doing wrong? How can I do this correctly?
Beta Was this translation helpful? Give feedback.
All reactions