File: geom3d.man

package info (click to toggle)
scilab 2.6-4
  • links: PTS
  • area: non-free
  • in suites: woody
  • size: 54,632 kB
  • ctags: 40,267
  • sloc: ansic: 267,851; fortran: 166,549; sh: 10,005; makefile: 4,119; tcl: 1,070; cpp: 233; csh: 143; asm: 135; perl: 130; java: 39
file content (39 lines) | stat: -rw-r--r-- 1,119 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
.TH geom3d 2 "April 1993" "Scilab Group" "Scilab Function"
.so ../sci.an
.SH NAME
geom3d - projection from 3D on 2D after a 3D plot
.SH CALLING SEQUENCE
.nf
[x,y]=geom3d(x1,y1,z1)
.fi
.SH PARAMETERS 
.TP 10
x1,y1,z1
: real vectors of the same size (points in 3D).
.TP
x,y 
: real vectors of the same size as \fVx1\fR, \fVy1\fR and \fVz1\fR.
.SH DESCRIPTION
After having used a 3D plot function such as \fVplot3d\fR, \fVplot3d1\fR
or \fVparam3d\fR, \fVgeom3d\fR gives the mapping
between a point in 3D space \fV(x1(i),y1(i),z1(i))\fR
and the corresponding point \fV(x(i),y(i))\fR in the projected 2D plan.
Then all the 2D graphics primitives working on \fV(x,y)\fR can be used 
for superposition on the 3D plot.
.SH EXAMPLE
.nf
deff("[z]=surf(x,y)","z=sin(x)*cos(y)")
t=%pi*(-10:10)/10;
// 3D plot of the surface
fplot3d(t,t,surf,35,45,"X@Y@Z")
// now (t,t,sin(t).*cos(t)) is a curve on the surface
// which can be drawn using geom3d and xpoly
[x,y]=geom3d(t,t,sin(t).*cos(t));
xpoly(x,y,"lines")
// adding a comment 
[x,y]=geom3d([0,0],[0,0],[5,0]);
xsegs(x,y)
xstring(x(1),y(1),"point (0,0,0)")
.fi
.SH AUTHOR
J.Ph.C.