C
L
O
S
E
|
2008-12-13-16-30 start
Curve of function atan(x) and
curve of function atan2(sin(t), cos(t))
is it possible to put two curves in one figure
and compare?
The answer is no.
Input of atan(x) need just one variable x
together with its output y(x) (x,y) form a
two dimensional curve. It can be plot on
a paper.
But input of atan(x) need two independent
variables x and y. Together with its output z(x,y)
(x,y,z) form a three dimensional surface. It
can not be plot on a paper. They can not be put
side by side and compare.
2008-12-13-16-39 stop
2008-12-15-08-06 start
Above "two independent variables x and y" is wrong.
Because in atan2(sin(t), cos(t)) it represent
x(t)=sin(t), y(t)=cos(t), both x and y depend on
same variable t. variables x and y depend on each
other. We can say that atan2(sin(t), cos(t)) is a
space curve, (not a surface).
In the future, Liu may find more error, will correct
error in the future version. When you read this file
Please put question mark more frequently.
2008-12-15-08-08
2008-12-15-14-12 Above correction let Liu write
function atan3D()
that is to write Space Curve Projector program.
2008-12-30-18-45
Curve has broken section, why it is so? Liu do
not know.
How to delete back side, not visible curve?
Liu do not know.
If you want no-broken, no-back graph, you need to
buy a professional 3D-drawing program. Go to search
engine, look for "3D graph", "space curve" etc.
you will find many 3D graph programs.
The following is a free profressional program.
(But Liu is not sure if they draw 3D curve)
2008-12-27-11-40
http://www.rene-grothmann.de/euler.html
Euler Math Toolbox
2008-12-27-11-4-06
http://mathsrv.ku-eichstaett.de/MGF/homes/grothmann/euler/
2008-12-27-11-47-29 download page
http://mathsrv.ku-eichstaett.de/MGF/homes/grothmann/euler/download.html
Newest version is Euler 6.30 File size is (35 MB)
2008-12-30-18-58 stop
2008-12-30-19-02 start
Time stamp in this file
At 9712261203 end use of geometry proportional method
At 9712261703 begin use rotation matrix method.
geometry proportional method is poor method, if error
it is hard to locate the trouble.
rotation matrix method is better method. if error, it
is easy to locate the trouble. Just exam rotation matrix
that should solve most trouble.
Part old notes (before 9712261203) it has nothing to do
with transform from 3D to 2D. Those note are still useful.
But note for geometry proportional method are deleted.
2008-12-30-19-13 stop
2008-12-30-22-01 start
from 2008-12-29-11-35 begin case study
to 2008-12-29-13-39 several special cases OK
from 97,12,30,21,29 begin perturbation test
to 97,12,30,21,53 put eye on axis, on coordinate
surface, no sudden big change direction
2008-12-30-22-04 stop
2008-12-30-22-19 above is eye perturbation
Actually, need worry screen-up direction
perturbation. Because screen-up direction
code is divided into eight code sections
[[
9712311124 "eight code sections" are deleted.
]]
2008-12-30-22-21
eye x, y, z = 10,-4,7
screen-up x, y, z = 1,0,0
next is ground x axis end point [3, 0, 0]
project to screen.
5.0885221961986345e-17, 1.1506841765115545
Above OK, below wrong
eye x, y, z = 10,-4,7
screen-up x, y, z = 1,0.001,0 (0.001 is perturbation)
next is ground x axis end point [3, 0, 0]
project to screen.
-0.0015907986197512594, -1.150683076886866
2008-12-30-22-24 sudden jump !!
from 1.1506841765115545 to -1.150683076886866
2008-12-31-09-28 case study too much work
Use known eye vector cross product known given
screen-up vector, get corrected screen-up vector
quickly!
2008-12-31-10-07
given screen-up vector
corrected screen-up vector
eye cross product given screen-up vector
eye vector given
given screen-up vector given
corrected screen-up vector unknown
eye, given screen-up, corrected screen-up
are in same plane.
eye and corrected screen-up perpendicular to
each other.
eye vector cross product with given screen-up vector
get crossed-result-vector.
crossed-result-vector cross product with eye vector
get corrected screen-up
2008-12-31-10-10
"eight code sections" are deleted. change to next codes.
wkxyz=eyeXup(eyexyz,scrUPxyz); //9712311039
function eyeXup(eye0,up0) //9712311005
function v1Xv2(v1,v2) //9712311019
function length1(inVec) //9712311031
2008-12-31-11-29 record
[[
eye x, y, z = 10,-4,7
screen-up x, y, z = 1,0,0
0, 1.1506841765115545
Right, because (0, positive) represent up direction
eye x, y, z = 10,-4,7
screen-up x, y, z = 1,0.001,0 (0.001 is perturbation)
-0.0015907986197512594, -1.150683076886866
Wrong, ask x axis to be up, but it is downward.
2008-12-30-22-29
]]
from 1.1506841765115545
to -1.150683076886866
that is big change, start from perturbation 0.001
Above is geometry proportional method, get error.
Below is rotation matrix method, get correct result.
2008-12-31-10-59 test new code (time stamp is //9712311039)
eye x, y, z = 10,-4,7
screen-up x, y, z = 1,0,0
next is x axis end point [3, 0, 0] projection to screen
-5.0885221961986345e-17, 1.1506841765115547
eye x, y, z = 10,-4,7
screen-up x, y, z = 1,0.001,0 (0.001 is perturbation)
next is x axis end point [3, 0, 0] projection to screen
0.0015907986197512085, 1.1506830768868663
2008-12-31-11-02 no sudden change, safe.
from 1.1506841765115547
to 1.1506830768868663
no sudden change
2008-12-31-11-34
2008-12-31-13-07 begin (9712311307)
eye x, y, z short as eyeX,eyeY,eyeZ
screen-up x, y, z short as upX,upY,upZ
These two vectors are both user assigned.
It is hard for user to assign two perpendicular
vectors. If user do not assign two parallel
vectors, then program find out corrected screen-up
direction. short as topX,topY,topZ.
geometry proportional method (discarded) consider
eye on axis (three), eye on coordinate plane (three)
screen up = (1,0,0) (one case) and general case.
total eight cases. If each case use correct code
It is possible not get sudden big jump.
eyeX,eyeY,eyeZ
upX,upY,upZ
topX,topY,topZ
three vectors, has three unknown topX,topY,topZ
need three equations, they are
three vectors in same plane. a linear equation
eyeX,eyeY,eyeZ and topX,topY,topZ perpendicular
a linear equation
and
topX,topY,topZ vector length = 1. that is
topX*topX+topY*topY+topZ*topZ=1
a nonlinear equation. To simplify work, normalize
topX,topY,topZ vector at last stage. It is OK(?)
to set topZ=1 let topX,topY be two unknown to
meet two linear equation. After solve topX,topY
then require topX*topX+topY*topY+topZ*topZ=1
The trouble is at "to set topZ=1" , because for
a quadratic equation topX*topX+topY*topY+topZ*topZ=1
topZ=-1 is also a solution. When it is the case of
topZ=-1, program still set topZ=+1 ? result is
tiny perturbation cause three ground x,y,z axis
sudden big rotate 180 degree!! A stunning scene.
After thinking, discarded eight code section,
change to
[0,0,0]_to_eye cross-product given screen-up
get crossed-result-vector, then
crossed-result-vector cross-product with eye
vector to get corrected screen-up
Carry out cross product twice and normalize once
get corrected screen-up. This is a smooth process
no sudden change.
2008-12-31-13-37 stop
2009-01-06-09-15
2009-01-03-23-34 (U.S. Pacific time) first time upload
this file curve3d2.htm to Internet at
http://freeman2.com/curve3d2.htm
2009-01-04-09-16 upload rocsitee.js for announcement.
2009-01-05-09-51 upload screen-back curve, that is
"Did you say you leave home without it? Do not worry about it."
.....2009-01-04-16-09
2009-01-06-10-06 upload statistic curve, that is
'Paste statistic data to Box 2, click "Draw 2D data".'
This example prints Chinese flag sun shine part.
It is not a math curve, close to statistic example.
2009-01-06-09-33
2009-01-07-19-56
This file curve3d2.htm allow user to put one
statistic curve data to box 2. If you need to
put more statistic curve in one graph, goto
http://freeman2.com/graph03e.htm
graph03e.htm allow you put at most five curves.
2009-01-07 add coin curve. Coin has three
surface. Top, side and bottom. Program use
stepf() to control when draw what.
When independent variable 0< t <3
switch function
stepf(t,0)*(1-stepf(t,3))*
turn on for following definition (bottom)
x(t):sin(t)*cos(60*t)
y(t):sin(t)*sin(60*t)
z(t):0.3
When independent variable 3< t <5
switch function
stepf(t,3)*(1-stepf(t,5))*
turn on for following definition (side)
x(t):cos(60*t)
y(t):sin(60*t)
z(t):t/10
When independent variable 5< t <8
switch function
stepf(t,5)*(1-stepf(t,8))*
turn on for following definition (Top)
x(t):sin(t)*cos(60*t)
y(t):sin(t)*sin(60*t)
z(t):0.5
When t=3, side height z(t):t/10=3/10=0.3
Match bottom height z(t):0.3
When t=5, side height z(t):t/10=5/10=0.5
Match top height z(t):0.5
This match is necessary, otherwise three
parts separate.
This 'just right' need oneself bend his
finger to calculate, it is not coincidence
This file take care only height match.
Did not take care each part begin/end match
You can find long straight line in the coin.
2009-01-07-20-19
2009-01-07-23-00
change 'coin' to 'dumbbell', look better.
2009-01-07-23-01
2009-01-08-08-29
This file use matrix rotation method to
transform curve point coordinate from ground
coordinate to rotated eye coordinate.
Quarternion can also rotate. On
2009-01-07-15-30 Quarternion rotation success.
No new function, just increase file size.
Decide not upload Quarternion rotation code.
2009-01-08-08-32
|