Dear all,
I have a 3-dimensional polyhedron mesh where two polyhedrons are overlapped. I want to clip the polyhedron to make new polyhedrons where one portion belong the overlapping region and other non-overlapping region. If somebody knows how to do this, please let me know.
2nd option:I saw IDL's 'mesh_clip' but it is a clip using a planar surface. I dont prefer to clip using a plane, but in case if I have to use it, how I can get the coordinates of the overlapping portion?
3rd option: I also saw some discussions like polygon union/intersection ( https://groups.google.com/forum/#!searchin/comp.lang.idl-pvw ave/polygon$20intersection/comp.lang.idl-pvwave/uVpIUkvt-94/ Sd3NwjH-BxEJ) where Mati Maeron suggested shape_overlap.pro. But I canot find his libarry and the script. I checked in this link http://www.astro.washington.edu/docs/idl/htmlhelp/slibrary23 .html. Does anyone know where I can get his library and script?
Anyway my script/polyhedron is something like this. Dick helped me to create polyhedrons, but here I used iplot, and ipolygon.
;;1st polyhedron
x=randomu(seed,4)
y=randomu(seed,4)
z=randomu(seed,4)
xyz=[transpose(x),transpose(y),transpose(z)]
iPLOT,xyz,LINESTYLE=6,AXIS_STYLE=2,identifier='1'
QHULL,xyz,Vert
conn=[REPLICATE(3,[1,N_ElEMENTS(Vert)/3]),Vert]
iPOLYGON,xyz,/DATA,CONNECTIVITY=conn,visualization='1',trans parency=50,/FILL_BACKGROUND,FILL_COLOR='SKY BLUE'
;;2nd polyhedron
x=randomu(seed,12)
y=randomu(seed,12)
z=randomu(seed,12)
xyz=[transpose(x),transpose(y),transpose(z)]
iPLOT,xyz,LINESTYLE=6,/OVERPLOT,identifier='2'
QHULL,xyz,Vert
conn=[REPLICATE(3,[1,N_ElEMENTS(Vert)/3]),Vert]
iPOLYGON,xyz,/DATA,CONNECTIVITY=conn,visualization='2',trans parency=50,/FILL_BACKGROUND,FILL_COLOR='red'
Thanks,
Guni
|