raw_ideas.dyn (7.3 KB)
Hello Dynos,
I love this page ver much, i did some Vpython stuff:
I would like to create curves like a “Mauer rose”
Is there anaything like “turtle” in dynamo ? I can`t import any pen.
I ve seen i can use via designScript points, curves and they are driven by math.
In this Code, what have to be adapted to designScript:
import turtle \There is no turtle library, what can use instead?
from math import cos,sin
from time import sleep
window = turtle.Screen() \replaced by backgroundview in Dynamo
window.bgcolor("#FFFFFF")
myPen = turtle.Turtle()
myPen.hideturtle()
myPen.tracer(0)
myPen.speed(0)
myPen.pensize(3)
myPen.color("#AA00AA")
myPen.penup()
A = 100
B = 100
a = 3
b = 4
delta = 3.14/2
t=0
for i in range(0,1000): \that should work also in dynamo
- t+=0.01*
- #Apply Lissajous Parametric Equations*
- x = A * sin(a*t + delta) *
- y = B * sin(bt)
**myPen.goto(x,y)**
** myPen.pendown()**
** myPen.getscreen().update()**
sleep(0.5) \there is no sleep in Python - is it like “break”? The for loop should work
Maybe someone has some info about that, I just found a spiral example, but nothing more
KR
Andreas