!set title=Distancia de un punto a un plano 2
!if $wims_read_parm!=$empty
 !goto $wims_read_parm
!endif
oef2wims_version=3.22
language=fr
leftrange=-5.000000
rightrange=5.000000
author=Bernadette PERRIN-RIOU
email=bpr@math.u-psud.fr
computeanswer=yes
precision=10000

ansorder=c,r
varcnt=25
prevarcnt=24
postvarcnt=0
replycnt=1
choicecnt=1
conditioncnt=0
feedbackcnt=0
format=html

val1=$imagedir
val2=$confparm1
val3=$confparm2
val4=$confparm3
val5=$confparm4

!if $testcondition=yes
 !goto test
!endif
!if $status=waiting
 !exit
!endif

tmp0=!randint -10, 10

val6=$[rint($(tmp0))]
tmp0=!randint -10, 10

val7=$[rint($(tmp0))]
tmp0=!randint -10, 10

val8=$[rint($(tmp0))]
tmp0=!randint -5, 5

val9=$[rint($(tmp0))]
tmp0=!randint -5, 5

val10=$[rint($(tmp0))]
tmp0=!randint -1, 1

val11=$[rint($(tmp0))]
tmp0=!randint -5, 5

val12=$[rint($(tmp0))]
tmp0=!randint -5, 5

val13=$[rint($(tmp0))]
tmp0=!randint -1, 1

val14=$[rint($(tmp0))]

!ifval $val12=$val9 and $val13=$val10 and $val14=$val11 
val12=$[rint( $val12-1)]
!endif
tmp0=!randint -5, 5

val15=$[rint($(tmp0))]
tmp0=!randint -5, 5

val16=$[rint($(tmp0))]
tmp0=!randint -5, 5

val17=$[rint($(tmp0))]
val18=$val12-($val9),$val13-($val10),$val14-($val11)
val19=$val15-($val9),$val16-($val10),$val17-($val11)

!ifval ($val12-($val9))*($val16-($val10))=($val15-($val9))*($val13-($val10))	and  ($val15-($val12))*($val10-($val13))=($val9-($val12))*($val16-($val13))	and  ($val9-($val15))*($val13-($val16))=($val12-($val15))*($val10-($val16)) 
val20= 	1
!else
val20=2
!endif
val21=una recta,un plano
tmp0=!item $val20 of $val21

val22=$(tmp0)
val23=$val6-($val9),$val7-($val10),$val8-($val11)

!ifval $val22=1 
val19= $val23
!endif
tmp0=!item 2 of $val18

tmp1=!item 3 of $val19

tmp2=!item 3 of $val18

tmp3=!item 2 of $val19

tmp4=!item 3 of $val18

tmp5=!item 1 of $val19

tmp6=!item 1 of $val18

tmp7=!item 3 of $val19

tmp8=!item 1 of $val18

tmp9=!item 2 of $val19

tmp10=!item 2 of $val18

tmp11=!item 1 of $val19

val24=$[(($(tmp0))*($(tmp1))-($(tmp2))*($(tmp3)))^2	+(($(tmp4))*($(tmp5))-($(tmp6))*($(tmp7)))^2	+(($(tmp8))*($(tmp9))-($(tmp10))*($(tmp11)))^2]
!if $val22=1 
tmp0=!item 1 of $val18

tmp1=!item 2 of $val18

tmp2=!item 3 of $val18

val25=$[(($val24)/($(tmp0))^2+($(tmp1))^2+($(tmp2))^2)^(1/2)]
!else
tmp=!trim $val18	  $val19	  $val23
val26=!translate internal $	\
$ to ;; in $tmp
tmp=!translate $	$ to ; in $val26

tmp0=!exec pari matdet([$tmp])
val25=$[abs($(tmp0))/($val24)^(1/2)]
!endif
oefsteps=choice 1	reply 1 
nextstep=!nosubst choice 1	reply 1 
!readproc oef/steps.proc
replytype1=numeric
replyname1=distancia
replygood1=$[$val25]
choicename1=
choicegood1=$val22
choicebad1=$val21
question=__EXECUTED_1692754_EXERCISE__
hint=__EXECUTED_1692754_EXERCISE__

!goto stat

!exit

:question
$()	Soit 
!insmath Q = ($val9 , $val10 , $val11)
$() ,  
!insmath R = ($val12 , $val13 , $val14)
$() ,  	
!insmath S = ($val15 , $val16 , $val17)
$(). 	 
!if $m_step <= 1 
$() Los puntos 
!insmath Q
$(), 
!insmath R
$() et 
!insmath S
$()  definen  
!read oef/embed.phtml choice 1 
$() 
!endif
$()	 
!if $m_step=2 
$()Calcular la distancia del punto 
!insmath P = ($val6 , $val7 , $val8) 
$()	 
!if $val20=2 
$()al plano que contiene a los puntos 
!insmath Q
$(), 
!insmath R 
$() y 
!insmath S
$(). 
!endif
$()	 
!if $val20=1 
$()a la recta que contiene a los puntos 
!insmath Q
$(), 
!insmath R
$() et 
!insmath S
$(). 
!endif
$()	 
!endif
$()
$()
!exit

:hint
$() 
!if $m_step=2 and $val20=2 
$()	La distancia de un punto 
!insmath P
$() al plano determinado por tres puntos 
!insmath Q
$(), 
!insmath R
$() et 
!insmath  S
$() puede calcularse mediante la fórmula	<center>  
!insmath \frac{ |\vec{QR}.(\vec{QS}\wedge \vec{QP})||}{|| \vec{QR}\wedge \vec{QS}|} = \frac{|det(\vec{QR} , \vec{QS} , \vec{QP})|}{|| \vec{QR}\wedge \vec{QS}|| }
$()	</center>	 
!endif
$()
$()
!exit

:help
$()
$()
!exit

:solution
$()
$()
!exit

:feedback

!exit

:test

!exit

:stat
vsavelist=6,7,8,9,10,11,12,13,14,15,16,17,20
embedcnt=1
