!set title=Distancia o ángulo entre dos planos
!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=23
prevarcnt=22
postvarcnt=0
replycnt=1
choicecnt=1
conditioncnt=0
feedbackcnt=2
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))]
!if ($val6)^2+($val7)^2+($val8)^2=0 
tmp0=!randint 1, 4

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

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

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

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

tmp1=!randitem 1,-1

val12=$[rint($(tmp0)*$(tmp1))]
val13=$[($val6)*($val9)+($val7)*($val10)+($val8)*($val11)]
tmp0=!randitem 1,2

val14=$(tmp0)

!ifval $val14=1 
tmp0=!randint -10, 10

val15=$[rint( $(tmp0))]
!else
val15=$[rint( $val12*($val6))]
!endif

!ifval $val14=1 
tmp0=!randint -10, 10

val16=$[rint( $(tmp0))]
!else
val16=$[rint( $val12*($val7))]
!endif

!ifval $val14=1 
tmp0=!randint -10, 10

val17=$[rint( $(tmp0))]
!else
val17=$[rint( $val12*($val8))]
!endif

!ifval ($val15)^2+($val16)^2+($val17)^2=0
tmp0=!randint 1, 4

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

val18=$[rint($(tmp0))]
tmp=!translate ";': to $     $ in ($val15)*x + ($val16)*y + ($val17)*z

tmp=!lower $tmp
tmp0=!exec maxima fullratsimp($tmp);
val19=!rawmath $(tmp0)
tmp=!translate ";': to $     $ in ($val6)*x + ($val7)*y + ($val8)*z

tmp=!lower $tmp
tmp0=!exec maxima fullratsimp($tmp);
val20=!rawmath $(tmp0)
val21=$[(($val15)*($val7)-($val16)*($val6))^2+(($val17)*($val7)-($val16)*($val8))^2+(($val15)*($val8)-($val17)*($val6))^2]
val22=paralelos, no paralelos

!ifval $val21=0 
tmp0=!item 1 of $val22

val23= $(tmp0)
!else
tmp1=!item 2 of $val22

val23= $(tmp1)
!endif

!ifval $val21=0 
val24=$[ 	abs(($val15)*($val9)+($val16)*($val10)+($val17)*($val11)-($val18))/(($val15)^2+($val16)^2+($val17)^2)^(1/2)]
!else
val24=$[	(abs(($val6)*($val15)+($val7)*($val16)+($val8)*($val17)))/((($val15)^2+($val16)^2+($val17)^2)^(1/2)*(($val6)^2+($val7)^2+($val8)^2)^(1/2))]
!endif

!ifval $val21=0 
val25= distance
!else
val25=cosinus
!endif
oefsteps=choice 1	reply 1 
nextstep=!nosubst choice 1	reply 1 
!readproc oef/steps.proc
replytype1=numeric
replyname1=$val25
replygood1=$[$val24]
choicename1=Los dos planos son
choicegood1=$val23
choicebad1=$val22
question=__EXECUTED_1692754_EXERCISE__
hint=__EXECUTED_1692754_EXERCISE__

!goto stat

!exit

:question
$()Consideremos los dos planos de 
!insmath \RR^3
$() 	de ecuaciones respectivas 
!insmath $val19  = $val18
$() y 
!insmath $val20 = $val13
$().	 
!if $m_step <= 1 
$()Los planos son  
!read oef/embed.phtml choice 1 
$(). 	 
!endif
$()	 
!if $m_step=2 
$()	   
!if $val21=0 
$()Calcular la distancia entre los dos planos paralelos. 	   
!else
$() Calcular el coseno del ángulo que forman los dos planos no pararlelos. 
!endif
$()	   
!endif
$()	
$()
!exit

:hint
$()	 
!if $val21 <>0 and $m_step=2 
$()Para calcular el ángulo que forman dos planos  no paralelos, se puede calcular el ángulo que forman los dos vectores normales (perpendiculares) 
!insmath \vec{n}_1
$() y 
!insmath \vec{n}_2
$() respectivos a cada plano. El coseno del ángulo buscado está dado por  	<p><center>	 
!insmath cos u= \frac{\vec{n}_1 . \vec{n}_2}{||\vec{n}_1||\ ||\vec{n}_2||}
$()	</center> 
!endif
$()	 
!if $val21 =0 and $m_step=2 
$()Para calcular la distancia entre dos planos paralelos, se puede calcular la distancia de un punto de uno de ellos al otro plano.	 Es fácil deducir que si las ecuaciones de los planos son 
!insmath ax + by + cz = d_1
$() 	 et  
!insmath ax + by + cz = d_2
$(). La distancia entre los dos planos (paralelos) es igual a 	<center>
!insmath \frac{|d_1 - d_2|}{\sqrt{a^2 + b^2 + c^2}}
$()	</center> 
!endif
$()	
$()
!exit

:help
$()
$()
!exit

:solution
$()
$()
!exit

:feedback
!ifval $m_reply1 <0 and $val21=0
 <p>Una distancia es un número real positivo.
$()
!endif
!ifval abs($m_reply1)>1 and $val21<>0
 <p>El coseno de un ángulo está comprendido entre -1 y 1. 
$()
!endif

!exit

:test

!exit

:stat
vsavelist=13,18,19,20,21
embedcnt=1
