home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
i
/
iritsm3s.zip
/
irit
/
cone-cyl.irt
< prev
next >
Wrap
Text File
|
1991-12-15
|
765b
|
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;