3D Geometry in Geogebra - a parametric curve and tangent vector

advertisement
3D in Geogebra – a parametric curve and tangent vector
Paul Robinson, IT Tallaght
Websites
Geogebra Homepage:
http://www.geogebra.org/cms/
Use the Appletstart Version of Geogebra or download a stand alone version.
Geogebra Forum:
http://www.geogebra.org/forum/
Community of Geogebra users, bug reports and feature requests
Geogebra Facebook Group: http://www.facebook.com/home.php#!/geogebra
Pretty active, conference news, lots of helpful stuff
Geogebra Wiki:
http://www.geogebra.org/en/wiki/index.php/English
Collection of re-usable teaching resources
University of Limerick:
http://www.ul.ie/cemtl/resources.htm
Excellent GeoGebra step by step demos
–
Math 247:
http://math247.pbworks.com/Learn-and-Use-GeoGebra
Fantastic Step-by-Step Help on How to Use GeoGebra by Dr Linda FahlbergStojanovska. Includes accessing Geogebra properties and methods using Javascript
very cool.
LaTeX online equation editor:
http://www.numberempire.com/texequationeditor/equationeditor.php
Indispensible if you want to put mathematics into Moodle and don’t know any
LaTex!
Introduction
Geogebra can do a pretty good job of representing 3D objects, allowing rotations and
dilations to view things from different angles and to zoom in. These notes are based on a
construction by Michele Passante (http://www.mateblog.it/?p=372).
 px 
 
First a bit of theory: Let P   py  be a point in 3D space. The 3D rotation matrices about
p 
 z
the x, y and z axis are
0
0
1



Rx   0 cos(a)  sin(a) 
 0 sin(a) cos(a) 


 cos(b) 0  sin(b) 


Ry   0
1
0

 sin(b) 0 cos(b) 


 cos(c)  sin(c) 0 


Rz   sin(c) cos(c) 0 
 0
0
1 

where a, b and c are angles between 0o and 360o. The rotation RX will rotate P in the
horizontal plane anticlockwise about the vertical z axis through an angle of a, and
similarly for Ry and Rz. If we rotate P and the x, y, z coordinate frame using R we can
interpret the result as a rotated view of the original point P. This is what we will do in
the construction which follows.
We will write a general rotation as R  Rz Ry Rx , which will allow us to rotate about the 3
axes. Note that the 3 rotations do not commute with each other, meaning that if we write
them in a different order the result will generally be slightly different! This will not
matter in terms of using rotations to view 3D objects.
 qx 
 
After rotation the point P will have 3D coordinate RP   qy 
q 
 z
where the q coordinates now depend on the angles a, b and c. To see what this looks like
in 2D (on the screen!) we simply want two of the coordinates of RP. If we imagine the x
axis pointing out of the screen towards us then the screen coordinates are y, z. This
 qy 
means we need to plot the point Q    .
 qz 
This construction is OK, but it is not very flexible. As well as Q we will want to extract
some other information from the 3D point RP, and it is not easy to do in GeoGebra with
RP in this form. Instead we will start with
 px 
 1
0
0
 
 
 
 
P   py   p x  0   py  1   p z  0   p x E x  p y E y  p z E z
0
0
 1
p 
 
 
 
 z
Now RP  px RE x  py RE y  pz RE z . We can now think of px as the component of the
rotated P in the direction of the rotated axis RE x . If we let Wx be the 2D vector with
components the y and z coordinates of REx , and similarly for Wy and Wz then we have
Q  pxWx  pyWy  pzWz
The vectors pxWx , pyWy and pzWz are the components of the rotated P along the rotated
axis as viewed on the screen.
We will construct the rotation of a 3D point P with its axis frame. The point P does not
change its position, just our rotated view of it changes.
Creating a 3D axis frame
1. Put on sliders for angles a, b, c and another named d which will be used to lengthen
and shorten our axes:
Click on the slider tool then on the drawing pad. Call it a and select the angle
option. Go with the default of 0o to 360o.
Repeat for sliders b and c.
Create another slider called d with a Number value from 0.5 to 5 in steps of 0.1.
Right click the sliders (or their values in the left hand window) if you want to change their
properties.
click on the object selection tool if you want to move the sliders around.
2. Put in unit vectors along the x, y and z axes.
In the input line at the bottom of the screen type
E_x = {{1}, {0}, {0}}
press return
 1
 
This represents the column vector E x   0  . A row of numbers would be written as
0
 
{1, 0, 0}. We need a column as we want to multiply by a matrix.
Repeat the input for
E_y = {{0}, {1}, {0}}
and
E_z = {{0}, {0}, {1}}
3. Put in the rotation matrices Rx, Ry and Rz and the dilation matrix D
In the input line type
R_x = {{1, 0, 0}, {0, cos(a), -sin(a)}, {0, sin(a), cos(a)}}
R_y = {{cos(b), 0, -sin(b)}, {0, 1, 0}, {sin(b), 0, cos(b)}}
R_z = {{cos(c), -sin(c), 0}, {sin(c), cos(c), 0}, {0, 0, 1}}
press return
press return
press return
For the general rotation type
R = R_z*R_y*R_x
4. Create our axes
In the input line type
V_x = R*E_x
press return
press return
This will rotate (and dilate) the unit vector E_x which is pointing along the x-axis.
Repeat for
V_y = R*E_y
and
V_z = R*E_z
Now we need to see what that looks like on the screen. The vectors V_x, V_y and V_z are
column vectors. As mentioned in the introduction we want the 2nd and 3rd components of
our 3D vectors to create a point on the screen.
This is probably a good point to turn off labeling. Go to Options, labeling and click on No
New Objects.
In the input line type
W_x = (Element[Element[V_x,2],1], Element[Element[V_x,3],1])
and press return.
Element[V_x,2] is the second number in V_x, which is itself a list { } consisting of 1
number. We want the “first” number in that list. The round brackets in W_x mean that
we now have a point in 2D which you should see on the screen.
Repeat for
W_y = (Element[Element[V_y,2],1], Element[Element[V_y,3],1])
W_z = (Element[Element[V_z,2],1], Element[Element[V_z,3],1])
In the input line type
u = vector[d*W_x]
press return
Repeat for v = vector[d*W_y] and w = vector[d*W_z].
Hide the points W_x, W_y and W_z by clicking on the circles next to their definition in the
left hand window.
Click on the object Selection Tool then move sliders a and b to 30o, followed by moving c.
See that d makes things bigger and smaller.
5. Make the axes look a bit nicer.
Go to View and click on Axes to remove the default GeoGebra axes.
Right click on the u vector (do it in the definition in the left hand window) and go to
Properties at the bottom of the list. Use ctrl or shift to select u, v and w in the vector list
simultaneously. Set the Colour to dark blue and the Style line thickness to 5.
In the input line type –u and press return. Do the same for –v and –w.
Select these 3 new vectors as before, leave the colour on black and the line thickness as
thin but change the line style to fine dots.
We also need to label our axes. Click on the small arrow at the bottom of the Slider Tool
and select the Insert Text option. Click on the screen anywhere and type X for the
text. Now right click the X text, go to Properties and Position. In the Starting Point box
type 2*W_x. You may use the mouse to move the X text slightly but as you move the slider
controls a, b, c and d it should follow the arrow head of the x-axis.
Repeat this text insert for Y (Starting position 2*W_y) and Z (Starting position 2*W_z).
As a final flourish type
Polygon[d*(W_x+W_y), d*(-W_x+W_y), d*(-W_x-W_y), d*(W_x-W_y)]
And press return.
Right click each side of this polygon and click off Show Object.
Use the Panning Tool (click it then drag on the screen) if you want to centre your
construction a little. Click the little arrow on the panning tool to bring up the Zoom In
and Zoom Out Tools (click then click the screen) if you want your picture bigger or
smaller.
We can now put other objects on our axes frame like points, lines and planes and see
what they look like in 3D. We can also make geometric objects e.g. a cube made up of
corners (points) and faces (polygons).
Parametric plot of a 3D curve
In the document “3D in Geogebra – a curve and tangent vector” we created a curve as a
collection of points using the GeoGebra spreadsheet to generate points. In this example
we will produce a solid curve using the GeoGebra curve command. This will plot a
parametrized 2D curve, so we will have to make it plot the 2D representation of a 3D
parametrized curve.
We will construct a curve plot of the helix with parametric form
r  (cos(t),sin(t),t)
This describes a point moving in a circle in the horizontal plane as t changes, while
simultaneously moving up the z –axis. The result is a corkscrew type path winding round
the z-axis.
By default, GeoGebra assumes that the t values are radians.
As discussed in the introduction a point P with coordinates px, py, pz will have the screen
coordinate Q  pxWx  pyWy  pzWz . In our example px = cos(t), py = sin(t) and pz = t. It
would be nice to be able to define px, py, pz as functions of t, but GeoGebra does not like
using t – it must use x as a variable in functions. To avoid confusion we will use p1, p2, p3
instead of px, py, pz in what follows. In the input line type
p_1(x) = cos(x)
p_2(x) = sin(x)
p_3(x) = cos(x)
We do not want to see the curves produced so click the circle next to their definition in
the Algebra view to hide them.
The screen coordinate of a point P on the curve will be Q  p1(t)W1  p2 (t)W2  p3(t)W3
and this will have x-coordinate x(Q) and y-coordinate y(Q) in GeoGebra.
In the input line type
C = Curve[x(p_1(t)*W_1+ p_2(t)*W_2+ p_3(t)*W_3),
y(p_1(t)*W_1+ p_2(t)*W_2+ p_3(t)*W_3), t, -3*Pi, 3*Pi]
And press return.
With any luck, you should see your corkscrew! This is the curve C. Rotate the axes to take
a look at it.
You can change your curve by changing the definitions of p 1, p2 and p3.
Problems
Construct the following curves
(a) r  (t * cos(t),t * s in(t),t / 2)
(b) r  (cos(3 * t),2 * s in(3 * t),t)
(c) r  (1  t,t2 ,t)
(d) r  (cos(4 * t),s in(3 * t),t)
t from 0 to 6.3
t from 0 to 6.3
t from 0 to 6.3
t from -3*Pi to 3*Pi
The Position and Tangent vectors of the curve
Put a slider on the screen named t taking values from 0 to 6.3 in increments of 0.1.
In the input line type
Vector[C(t)]
press return
Colour the vector red. You can animate t and the angle c (right click each slider and click
on animate – you can also go to Properties.. and Slider and set the Repeat to Increasing
to stop it animating backwards).
If r  (cos(t),sin(t),t) then the tangent vector (or velocity vector) to the curve at r is
dr
T
 ( sin(t),cos(t),1)
dt
In the input line type
T = -sin(t)*W_1 + cos(t)*W_2 + W_3
vector[C(t), C(t) + T]
press return
press return
This form of the vector command produces a vector starting at C(t) rather than at the
origin. Hide the point T and colour this tangent vector green.
Animating t (and possibly c to see what is going on) you can see that T points “along” the
curve. You may want to hide the Algebra View.
Problems
1. The acceleration vector for the curve at r is
A
dT
dr
Construct vector[C(t), C(t) + A] as above and satisfy yourself that the velocity and
acceleration vectors are always at right angles to one another.
2. construct the following curves with their associated position, velocity and acceleration
vectors.
(a)
(b)
(c)
(d)
r  (t * cos(t),t * s in(t),t / 2)
r  (cos(3 * t),2 * s in(3 * t),t)
r  (1  t,t2 ,t)
r  (cos(4 * t),s in(3 * t),t)
t
t
t
t
from
from
from
from
0 to 6.3
0 to 6.3
0 to 6.3
-3*Pi to 3*Pi
Download