Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
Tratto da modulo H3/geometry/oeftranslation.fr
(con modifiche per togliere rif. ai sistemi di riferimento)
\title{Ruote e traslazioni}
\language{fr}
\range{-5..5}
\author{YAMEOGO, Joachim}
\email{yameogo@unice.fr}
\computeanswer{no}
\format{html}
\precision{10000}
#cadre du dessin
\integer{r=5}
\integer{h=100*(\r)}
##couleur des grilles
\text{gridcolor=lightblue}
##les rayons de la roue
\integer{d2=random(50..150)}
\integer{borng=\d2-20}
\integer{bornd=\d2-10}
\integer{d1=random(\borng..\bornd)}
\real{r1=(\d1)/50}
\real{r2=(\d2)/50}
##constantes de rotation
\real{a=(sqrt(3))/2}
\real{b=1/2}
\text{rot1=1,0,0,1}
\text{rot2=-1,0,0,-1}
\text{rot3=0,-1,1,0}
\text{rot4=0,1,-1,0}
\matrix{matrots=\rot1
\rot2
\rot3
\rot4
}
##points de suture
\text{spt1=(\r1)*(\a),(-\r1)*(\b)}
\text{spt2=0,\r1}
\text{spt3=(-\r1)*(\a),(-\r1)*(\b)}
##centres des roues
\integer{x1=random(-7,-6,-5)}
\integer{x2=random(-3,-2,-1)}
\integer{x3=random(1,2,3)}
\integer{x4=random(5,6,7)}
\integer{y1=random(-7..7)}
\integer{y2=random(-7..7)}
\integer{y3=random(-7..7)}
\integer{y4=random(-7..7)}
##couleurs possibles pour les roues
\text{color1=blue}
\text{color2=green}
\text{color3=orange}
\text{color4=black}
##permutations
\text{permrots=shuffle(4)}
\text{aff1=item(1,\permrots)}
\text{aff2=item(2,\permrots)}
\text{aff3=item(3,\permrots)}
\text{aff4=\aff1}
\text{permrots=shuffle(\aff1,\aff2,\aff3,\aff4)}
\text{rposits=position(\aff1,\permrots)}
\text{rposi1=item(1,\rposits)}
\text{rposi2=item(2,\rposits)}
\text{aff1=item(1,\permrots)}
\text{aff2=item(2,\permrots)}
\text{aff3=item(3,\permrots)}
\text{aff4=item(4,\permrots)}
\text{aff1=\matrots[\aff1;]}
\text{aff2=\matrots[\aff2;]}
\text{aff3=\matrots[\aff3;]}
\text{aff4=\matrots[\aff4;]}
\text{permcolor=shuffle(\color1,\color2,\color3,\color4)}
\text{coul1=item(1,\permcolor)}
\text{coul2=item(2,\permcolor)}
\text{coul3=item(3,\permcolor)}
\text{coul4=item(4,\permcolor)}
\text{rcolor1=item(\rposi1,\permcolor)}
\text{rcolor2=item(\rposi2,\permcolor)}
\text{rcolor1=\rcolor1 iswordof blue?blu}
\text{rcolor1=\rcolor1 iswordof green?verde}
\text{rcolor1=\rcolor1 iswordof black?nero}
\text{rcolor1=\rcolor1 iswordof orange?arancio}
\text{rcolor2=\rcolor2 iswordof blue?blu}
\text{rcolor2=\rcolor2 iswordof green?verde}
\text{rcolor2=\rcolor2 iswordof black?nero}
\text{rcolor2=\rcolor2 iswordof orange?arancio}
\text{colorList=blu e verde,blu e arancio,blu e nero,verde e arancio,verde e nero,arancio e nero}
\text{phrase=\rcolor1 e \rcolor2}
\text{phrase=(\rcolor1 iswordof verde ) and (\rcolor2 iswordof blu)?\rcolor2 e \rcolor1}
\text{phrase=(\rcolor1 iswordof arancio ) and (\rcolor2 iswordof blu)?\rcolor2 e \rcolor1}
\text{phrase=(\rcolor1 iswordof nero ) and (\rcolor2 iswordof blu)?\rcolor2 e \rcolor1}
\text{phrase=(\rcolor1 iswordof arancio) and (\rcolor2 iswordof verde)?\rcolor2 e \rcolor1}
\text{phrase=(\rcolor1 iswordof nero ) and (\rcolor2 iswordof verde)?\rcolor2 e \rcolor1}
\text{phrase=(\rcolor1 iswordof nero ) and (\rcolor2 iswordof arancio)?\rcolor2 e \rcolor1}
\text{rep=position(\phrase,\colorList)}
####### enoncé de l'exo ######
\statement{<div>
Considerate le ruote seguenti nel piano.
Due di queste sono mandate l'una nell'altra per mezzo di una
traslazione. Quali?
</div>
<div class="wimscenter spacer">
\draw{\h,\h}{xrange -10,10
yrange -10,10
gridfill 0,0,10,10,\gridcolor
linewidth 2
translate 0.2,0.2
vline 0,0,\gridcolor
vline 2,0,\gridcolor
vline 4,0,\gridcolor
vline 6,0,\gridcolor
vline 8,0,\gridcolor
vline 10,0,\gridcolor
vline -2,0,\gridcolor
vline -4,0,\gridcolor
vline -6,0,\gridcolor
vline -8,0,\gridcolor
vline -10,0,\gridcolor
hline 0,0,\gridcolor
hline 0,2,\gridcolor
hline 0,4,\gridcolor
hline 0,6,\gridcolor
hline 0,8,\gridcolor
hline 0,10,\gridcolor
hline 0,-2,\gridcolor
hline 0,-4,\gridcolor
hline 0,-6,\gridcolor
hline 0,-8,\gridcolor
hline 0,-10,\gridcolor
killtranslate
affine \aff1,\x1,\y1
circle 0,0,\d1,\coul1
circle 0,0,\d2,\coul1
line 0,0,\spt1,\coul1
line 0,0,\spt2,\coul1
line 0,0,\spt3,\coul1
killaffine
affine \aff2,\x2,\y2
circle 0,0,\d1,\coul2
circle 0,0,\d2,\coul2
line 0,0,\spt1,\coul2
line 0,0,\spt2,\coul2
line 0,0,\spt3,\coul2
killaffine
affine \aff3,\x3,\y3
circle 0,0,\d1,\coul3
circle 0,0,\d2,\coul3
line 0,0,\spt1,\coul3
line 0,0,\spt2,\coul3
line 0,0,\spt3,\coul3
killaffine
affine \aff4,\x4,\y4
circle 0,0,\d1,\coul4
circle 0,0,\d2,\coul4
line 0,0,\spt1,\coul4
line 0,0,\spt2,\coul4
line 0,0,\spt3,\coul4
killaffine
}
</div>
}
\answer{SCELTA:}{\rep;\colorList}{type=radio}
Generated by GNU Enscript 1.6.5.90.