« Programmation objet et géométrie/Programmation avec DrGeoII » : différence entre les versions

Contenu supprimé Contenu ajouté
Ligne 404 :
 
<source lang="smalltalk">
|figure u p|
|figure s r u|
figure:=DrGeoCanvas new.
s:=figure segment: (figure point: 0@(-1)) to: (figure point: 4@(-1)).
r:=figure pointOnCurve: s at: 0.8.
s:=figure segment: (figure point: 0@0) to: (figure point: 0@1).
u:=figure pointOnCurve: s at: 0.7.
u round small.
Ligne 415 ⟶ 414 :
1 to: 100 do: [:n|
u:=figure point: [:parents| |y t|
y:=parents first point y.
t:=parents second point x.
(n/5)@t*y*(1-y)]
parents: {u.r}.
u round small.
u color: Color blue.