home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Professional
/
OS2PRO194.ISO
/
os2
/
graphic
/
irit
/
cone-cyl.irt
< prev
next >
Wrap
Text File
|
1991-12-15
|
808b
|
44 lines
#
# Intersection of cone and a cylinder:
# Try this one with resolution equal 20 - slower, but much nicer!
#
# Created by Gershon Elber, Jan. 89
#
save_mat = view_mat;
view_mat = view_mat * scale(vector(0.2, 0.2, 0.2));
save_res = resolution;
resolution = 8;
cone1 = cone(vector(0,0,-1),vector(0,0,4),2);
cylin1= cylin(vector(0,3,1),vector(0,-6,0),0.7);
a1 = cone1+cylin1;
interact(list(a1), false);
free(a1);
a2 = cone1*cylin1;
interact(list(a2), false);
free(a2);
a3 = cone1-cylin1;
interact(list(a3), false);
free(a3);
a4 = cylin1-cone1;
interact(list(a4), false);
free(a4);
intercrv = true;
a5 = cone1*cylin1;
interact(list(a5,cylin1,cone1), false);
free(a5);
intercrv = false;
free(cylin1);
free(cone1);
resolution = save_res;
view_mat = save_mat;