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 = 4 (slider from 2 to 10, step 1)
num = 3 (slider from 0 to 20, step 1)
b = Ray(O, A)
Q: (OA * num / den, 0.0)
c = OrthogonalLine(Q, b)
C = Point(c)
d = Segment(Q, C)
erreur: abs(x(Q) / 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' = Mirror(E, c)
poly1, e_1, e', f, g, F, G = Polygon(E, E', 4.0)
texte2 = Text("L'unité est partagée en " + den + " parts")
h = Segment(Translate[E, 4.3 * u + 0.5 * Vector[E, C]], Translate[E, 4.3 * u + 1.5 * Vector[E, C]])