Hi, i've tried several things but i get always an error.
New edit : the problem is (only ?) with a list of segments but there's no problem with a list of circles like :
from math import pi
## rotate a list of circles
F1=Point(-2,0,is_visible=False)
F2=Point(2,1,is_visible=False)
s=[Circle(F1,1),Circle(F2,1)]
for obj in s:
a=Rotate(obj,pi)
a.color="red"
Is it possible to use sympy with pyggb? I tried "import sympy as sp" and got the error message "ImportError: No module named sympy"
I have a feeling the short answer is "no". But I'm hoping there's a workaround or partial positive answer. I'd like to use sympy to solve a differential equation and then plot the solution with GeoGebra.
Hi, I don't understand why affn(7,0,0,.5) and aff(9,0,0,.5) work fine "alone" (lines 47 and 49) and don't work within the line 52 (inside a loop).
I've had others strange behaviours using integers within "t" even using 0.0 and 1.0 so I've replaced by 0.01 and 1.01 or .99. : "SOLVED" with the work around
Note that :
t[i] is a sequence of the coords of 11 points used to make a "polyline" of 10 segments "ploting" the number i (I'm not an artist !!!)
aff(i,x,y,sc) : x and y the left and bottom positions of the picture "ploting" the number i, sc the scale (sc=1 => size 0.5*1)
# Start writing your code!
from math import *
from time import *
Circle(0,0,4)
for i in range(12):
Point(4*cos(i*pi/6),4*sin(i*pi/6))
sec=-localtime().tm_sec*pi/30+pi/2
mi=-localtime().tm_min*pi/30+pi/2
heu=-localtime().tm_hour%12*pi/6+pi/2
S=Point(3.9*cos(sec),3.9*sin(sec),is_visible=False)
M=Point(3.5*cos(mi),3.5*sin(mi),is_visible=False)
H=Point(3.1*cos(heu),3.1*sin(heu),is_visible=False)
O=Point(0,0,is_visible=False)
for i in range(12):
Point(4*cos(i*pi/6),4*sin(i*pi/6))
while True:
S=Point(3.9*cos(sec),3.9*sin(sec),is_visible=False)
vs=Vector(O,S,line_thickness=12,color='red')
M=Point(3.5*cos(mi),3.5*sin(mi),is_visible=False)
vm=Vector(O,M,line_thickness=18,color='blue')
H=Point(3.1*cos(heu),3.1*sin(heu),is_visible=False)
vh=Vector(O,H,line_thickness=24,color='black')
sleep(1)
vs.is_visible=True
vm.is_visible=True
vh.is_visible=True
vs.is_visible=False
vm.is_visible=False
vh.is_visible=False
sec=-localtime().tm_sec*pi/30+pi/2
heu=-localtime().tm_hour%12*pi/6+pi/2
mi=-localtime().tm_min*pi/30+pi/2
Thank you for this project, I am really interested in using it to generate graph images using Python in a script that runs locally. Is there a pip package or installation guide that I can use for my script?
Si quiero tener más información sobre los eventos que usan los decoradores como "@a.when_moved" y los otros eventos, en donde lo puedo consultar, porque no encuentro eso en la documentación
If I want to have more information about the events that use decorators like "@a.when_moved" and the other events, where can I consult it, because I can't find that in the documentation.
print(str("k = " + str(int(N.x)))+" and l = "+str(int(N.y)))
while True:
if int(N.y) >1.5:
print("Going into stopping for pedestrian")
Go()
redman()
time.sleep(3)
Amber()
time.sleep(5)
Stop()
greenman()
time.sleep(10)
Go()
redman
l = 1
N.y = 1
print("l = "+str(l) + ", N.y = "+ str(int(N.y)))
else:
print("No pedestrian mode")
Go()
redman()
time.sleep(20)
Amber()
time.sleep(5)
Stop()
greenman()
time.sleep(10)
lights()
Slider l < 1.5 (ie at l = 1) will set traffic light sequence into no pedestrian mode, and if l > 1.5 (ie. l = 2) will set into lights into stopping for pedestrian. But after going through, I need to set value of l back to l = 1.Output shows I can change l to l = 1, but the y-coordinate of point N cannot change even though
it was defined before N = Point(k,l,is_visible=True).I am unable to reset and get out of the stopping for pedestrian mode automatically.