6. Step by Step Plotting Curves with
3DMath Explorer

Graphing with 3DMath
Explorer:

3DMath Explorer draws three dimensional
(3D) graphs. But curve dimensions change with number of defined
loop variables. So in this tutorial, in the first place
we grouped curves with their dimensions as one
dimensional (1D) curves, two dimensional (2D) curves and
three dimensional (3D) curves.

Now we take
them one by one and tell how we draw these curves’
graphs with 3DMath Explorer. But please do remember
3DMath Explorer draws three dimensional (3D) graphs, and
this don’t change with dimension of curves, 3DMath
Explorer draws all kind of curves in the same 3D
mathematical space.

6.1. Plotting
Graphs of One Dimensional (1D) Curves

In 3DMath
Explorer, curves defines with 3 functions one for each 3
axis’s. For example to draw a simple function curve like
y=2*x+4, blow definitions must be done.

fx=
x

fy=
2*x+4

fz=
0
(=> in reality fz= 0*x=0 )

As you see x
is the variable for three axis functions. So to draw
this curve variable x must be defined as a loop variable
with start, stop and step values.

-8<x<8
, Xstep =0.1

fx(x) =
x

fy(x) =
2*x+4

fz(x) =
0

Now let’s
enter this curves into curve explorer. As a result of
this we get below graph.

6.2. Plotting
Graphs of Two Dimensional (2D) Curves

Now let’s
take a two dimensional (2D) curve and change same
properties of it, and see how they would effect the
graph (or what graphs we would get).

Sphere is a
two dimensional curve. So it needs two loop variable
that are valid for three axis to draw.

0<a<Pi
, a(step)=Pi/10

0<b<2*Pi
, b(step)=Pi/10

fx(a,b) =
5*sin(a)*cos(b)

fy(a,b) =
5*cos(a)

fz(a,b) =
5*sin(a)*sin(b)

When we
chose the curve’s draw type as lines and its line withy
as 8 on the curve explorer, we gets the below
graph.

In the
below, you see the same curve on a different background
color after changing its line withy as 1 and its brush
color as Lime.

Now let’s
change start value of loop variable b from 0 to Pi/5 and
rotate the graph a little by mouse.

Pi/5<b<2*Pi
, b(step)=Pi/10

Let’s remove
fogging effect.

Now we
activate fogging effect but remove perspective
effect,

We again
activate perspective effect and make visible yz-grid
that covered with polygons

6.3. Plotting
Graphs of Tree Dimensional (3D) Curves

Now let’s
give a third dimension to a 2D sphere,

0<a<Pi ,
a(step)=Pi/10

Pi/5<b<2*Pi
, b(step)=Pi/10

fx(a,b) =
5*sin(a)*cos(b)

fy(a,b) =
5*cos(a)

fz(a,b) =
5*sin(a)*sin(b)

The constant
5 in the parameters of this curve is radius (r) of it.
So we can change these expressions as below;

0<a<Pi ,
a(step)=Pi/10

Pi/5<b<2*Pi
, b(step)=Pi/10

r =
5 (or 5<r<5 ,
r(step)=0)

fx(a,b,r) =
r*sin(a)*cos(b)

fy(a,b,r) =
r*cos(a)

fz(a,b,r) =
r*sin(a)*sin(b)

Finally we
have to define a new loop variable for third dimension.
Now let’s define r as third dimension variable. We
made this variable r a loop variable with start value 4,
end value 5 and step value 1, and we change step values
of a and b with value 0.3.

0<a<Pi ,
a(step)=0.3

Pi/5<b<2*Pi
, b(step)=0.3

4<r<5
, r(step)=1

fx(a,b,r) =
r*sin(a)*cos(b)

fy(a,b,r) =
r*cos(a)

fz(a,b,r) =
r*sin(a)*sin(b)

6.4. Approaching
to Curves / Zooming of Graphs

In reality,
zooming of graphs mains looking them from a near
position. Looking point is closely related with horizon
point. When horizon point is selected as (0,0,z) and
Z=-500, we are looking to the graph from coordinate at
(0,0,z) and Z=+500. But in %100 zoom view, we wants 1
unit vertical distance to draw with 20 pixel. So this
make us look to graph not from Z=500 but Z=25 (because
500/20 = 25) when %100 zoom view is selected. As a
result when %200 zoom view selected, our looking
point came at coordinate (0,0,12.5), and when %400 zoom
view selected, its goes to coordinate
(0,0,6.25).

When
perspective property of graph is on and the distance
between our view point and graph origin is less than
sphere’s radius, we would look and get view of graph
from inside of the sphere towards to outside of
it.

In the below
we are looking at a graph from coordinate at (0, 0, 4)
with %600 zoom. But this coordinate exists in a 3D
sphere. This make us get a view of graph from inside of
this 3D sphere. So we can see inside of this 3D sphere
and an other sphere that stays outside of this
sphere.

Now let’s
see striped view of the graph instead of the polygon
view.

As you see,
working on with 3DMath Explorer is such an easy.
In the course of time, you get use to 3D math
environment and will learn many more. But from now on,
it depends on you.