Placer une fraction
Author: vd

Déplacez l'étiquette sur le bon point.

Testez votre réponse.

OA = 6 (slider from -5 to 6, step 0.1)
O = (0, 0)
A = Point(Circle[O, OA])
a = Segment(O, A)
den = 2 (slider from 2 to 20, step 1)
num = 4 (slider from 0 to 20, step 1)
b = Ray(O, A)
B = Point(b)
c = OrthogonalLine(B, b)
C = Point(c)
d = Segment(B, C)
erreur: abs(x(B) / OA - num / den)
D = (0, 0.3)
u = Vector(O, D)
liste4 = Sequence(Segment[Point[O, i * Vector[O, A] / den], Translate[Point[O, i * Vector[O, A] / den], u]], i, 0.0, 10.0 * den, 1.0)
liste1 = Sequence(Segment[Point[O, i * Vector[O, A]], Translate[Point[O, i * Vector[O, A]], 2.0 * u]], i, 0.0, 10.0, 1.0)
liste2 = Sequence(Text[i, Translate[O, i * Vector[O, A] - 2.0 * u + Vector[O, (-0.2, 0.0)]]], i, 0.0, 10.0, 1.0)
e = OrthogonalLine(C, c)
E = Point(e)
E'_1 = Mirror(E, c)
poly1, f, g, h, i, F, G = Polygon(E, E'_1, 4.0)
texte2 = Text("L'unité est partagée en " + den + " parts")
deninitial = 16
H = (5.471183937165253, 2.6558317538672283)
I = (5.958015297391255, 2.6558317538672283)
v = Vector(E, C)
j = Segment(Translate[E, 3.0 * u + 0.5 * v], Translate[E, 3.0 * u + 1.5 * v])
denaffiché = If(deninitial < 10.0, Text[" " + deninitial], Text[deninitial])
numaffiché = If(num < 10.0, Text[" " + num], Text[num])