Download Morphing de curvas

Document related concepts
no text concepts found
Transcript
"Morphing"
José Luis Gómez-Muñoz
"Morphing" de una función seno a una parábola
Este es el dibujo de la función y=sen(x)
Plot@Sin@xD, 8x, 0, 2 ∗ Pi<D
1.0
0.5
Out[1]=
1
2
3
4
5
6
-0.5
-1.0
Este es el dibujo de la función y =
In[13]:=
PlotB
x2 − 20
20
x2 −20
20
, que es una parábola:
, 8x, 0, 2 ∗ Pi<F
1.0
0.5
Out[13]=
1
2
3
4
5
6
-0.5
-1.0
Este es el dibujo de una función que es 50% seno y 50% parábola
LAD05.nb
2
PlotB
H0.50L ∗ Sin@xD + H0.50L ∗
x2 − 20
20
,
8x, 0, 2 ∗ Pi<F
0.4
0.2
Out[32]=
1
2
3
4
5
6
-0.2
-0.4
Este es el dibujo de una función que es 20% seno y 80% parábola
PlotB
H0.20L ∗ Sin@xD + H0.80L ∗
x2 − 20
,
20
8x, 0, 2 ∗ Pi<F
0.5
Out[33]=
1
2
3
4
5
6
-0.5
El siguiente Manipulate te permite cambiar la función desde 100% seno hasta 100% parábola, pasando por todas las combinaciones intermedias:
LAD05.nb
3
ManipulateB
PlotBH 1 − aL ∗ Sin@xD + HaL ∗
x2 − 20
20
,
8x, 0, 2 ∗ Pi<F,
8a, 0, 1<F
a
1.0
0.5
Out[14]=
1
2
3
4
5
6
-0.5
-1.0
"Morphing" en coordenadas polares: de una rosa a un corazón
Este es un cardioide ("con forma de corazón") en coordenadas polares:
LAD05.nb
4
In[37]:=
PolarPlot@1 − Sin@tD, 8t, 0, 2 Pi<D
-1.0
-0.5
0.5
1.0
-0.5
Out[37]=
-1.0
-1.5
-2.0
Algunas opciones extra permiten obtener un mejor dibujo
In[57]:=
PolarPlot@1 − Sin@tD, 8t, 0, 2 Pi<,
PolarGridLines → Automatic, PlotStyle → ThickD
2
1
Out[57]=
-2
-1
1
-1
-2
Esta es una "rosa de 8 pétalos" en coordenadas polares
2
LAD05.nb
In[58]:=
5
PolarPlot@Sin@4 tD, 8t, 0, 2 Pi<,
PolarGridLines → Automatic, PlotStyle → ThickD
1.0
0.5
Out[58]=
-1.0
-0.5
0.5
1.0
-0.5
-1.0
Esta gráfica es 50% rosa y 50% corazón
In[59]:=
PolarPlot@
H0.50L ∗ Sin@4 tD + H0.50L ∗ H1 − Sin@tDL, 8t, 0, 2 Pi<,
PolarGridLines → Automatic, PlotStyle → ThickD
1.5
1.0
0.5
Out[59]=
-1.5
-1.0
-0.5
0.5
-0.5
-1.0
-1.5
1.0
1.5
LAD05.nb
6
Esta gráfica es 30% rosa y 70% corazón
In[61]:=
[email protected] ∗ Sin@4 tD + H0.70L ∗ H1 − Sin@tDL, 8t, 0, 2 Pi<,
PolarGridLines → Automatic, PlotStyle → ThickD
2
1
Out[61]=
-2
-1
1
2
-1
-2
El siguiente Manipulate te permite cambiar la función desde 100% rosa hasta 100% corazón, pasando por todas las combinaciones
intermedias:
LAD05.nb
In[62]:=
7
Manipulate@
PolarPlot@H1 − aL ∗ Sin@4 tD + HaL ∗ H1 − Sin@tDL, 8t, 0, 2 Pi<,
PolarGridLines → Automatic, PlotStyle → ThickD,
8a, 0, 1<D
a
1.0
0.5
Out[62]=
-1.0
-0.5
0.5
1.0
-0.5
-1.0
"Morphing" de curvas parámetricas
Una curva paramétrica similar a las hechas en clase:
LAD05.nb
8
In[30]:=
ParametricPlot@8Cos@2 ∗ tD, Sin@3 ∗ tD<, 8t, 0, 2 ∗ Pi<D
1.0
0.5
Out[30]=
-1.0
-0.5
0.5
1.0
-0.5
-1.0
Otra curva paramétrica similar a las mostradas en clase:
In[31]:=
ParametricPlot@8Cos@5 ∗ tD, Sin@3 ∗ tD<, 8t, 0, 2 ∗ Pi<D
1.0
0.5
Out[31]=
-1.0
-0.5
0.5
-0.5
-1.0
Trnasformando ("morphing") una curva en la otra
1.0
LAD05.nb
In[42]:=
9
Manipulate@
ParametricPlot@H1 − aL ∗ 8Cos@2 ∗ tD, Sin@3 ∗ tD< +
HaL ∗ 8Cos@5 ∗ tD, Sin@3 ∗ tD<, 8t, 0, 2 ∗ Pi<D,
8a, 0, 1<
D
a
1.0
0.5
Out[42]=
-1.0
-0.5
0.5
-0.5
-1.0
1.0
LAD05.nb
10
"Morphing" de una carita
In[49]:=
ManipulateAPlotAH1 − aL ∗ I− x2 M + HaL ∗ Ix2 − 1M, 8x, −1, 1<,
Axes → False, Epilog → 8Circle@80, 1<, 3D, Disk@81, 2<, .3D,
Disk@8−1, 2<, .3D, Line@880, 0.6<, 80, 1.6<<D<,
AspectRatio → 1, PlotRange → 88−3, 4<, 8−3, 4<<E, 8a, 0, 1<E
a
Out[49]=
LAD05.nb
11
"Morphing" de la carita con movimiento de un ojo
In[66]:=
ManipulateAPlotAH1 − aL ∗ I− x2 M + HaL ∗ Ix2 − 1M, 8x, −1, 1<, Axes → False,
Epilog → 8Circle@80, 1<, 3D, Disk@81, H1 − aL ∗ 1.5 + HaL ∗ 2.5<, .3D,
Disk@8−1, 2<, .3D, Line@880, 0.6<, 80, 1.6<<D<,
AspectRatio → 1, PlotRange → 88−3, 4<, 8−3, 4<<E, 8a, 0, 1<E
a
Out[66]=