comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Creating mesh from XYZ points
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Creating mesh from XYZ points [message #83646 is a reply to message #83523] Thu, 14 March 2013 11:37 Go to previous messageGo to previous message
Dick Jackson is currently offline  Dick Jackson
Messages: 347
Registered: August 1998
Senior Member
Hi Mairan,

Good to hear this is working so far. There are options to set scale
and window size in XObjView, and an XObjView_Rotate to spin it. Bonus:
XObjView_Write_Image to save a snapshot to a file.

There's not a simple way to get different axis scaling as you had in
your original triple-plot, but for this, I feel that keeping them the
same (isotropic) in all views is preferable for communicating the true
3-D shape.

I believe I have set up exactly the views you want (YvsX, YvsZ, XvsZ),
but I'm not sure if your original views in the PDF were rendering
exactly right. (if the second plot were correct, I'd expect in the
first plot that the middle overlap section would show the red lump in
front, not the blue)

I hope this helps!


PRO QHullTest

xyz1 = RandomU(seed, 3, 100) + Rebin([0, 0.35, 0.35], 3, 100)
xyz2 = RandomU(seed, 3, 100) + Rebin([0, -0.35, -0.35], 3, 100)

QHull, xyz1, tri1
QHull, xyz2, tri2

;; Make connectivity arrays from list of triangles

conn1 = [Replicate(3, 1, (N_Elements(tri1)/3)), tri1]
conn2 = [Replicate(3, 1, (N_Elements(tri2)/3)), tri2]

oMesh1 = Obj_New('IDLgrPolygon', xyz1, Polygons=conn1, Style=2,
Color=[255,0,0])
; You probably want to use Vert_Colors to add the colour
information!
oMesh2 = Obj_New('IDLgrPolygon', xyz2, Polygons=conn2, Style=2,
Color=[0,0,255])

XObjView, [oMesh1, oMesh2], $
XSize=200, YSize=300, Scale=(1/Sqrt(3)), $ ; Default scale is 1/
Sqrt(3)
TLB=wXObjViewTLB

XObjView, Refresh=wXObjViewTLB ; Ensure that scene is drawn
XObjView_Write_Image, 'snapYvsX.png', 'png'
Wait, 1
XObjView_Rotate, [0, 1, 0], 90 ; +90 around Y
XObjView_Write_Image, 'snapYvsZ.png', 'png'
Wait, 1
XObjView_Rotate, [1, 0, 0], 90 ; +90 around X
XObjView_Write_Image, 'snapXvsZ.png', 'png'

END


Cheers,
-Dick

Dick Jackson Software Consulting
Victoria, BC, Canada
www.d-jackson.com

On Mar 14, 10:14 am, Mairan Teodoro <mairan.teod...@gmail.com> wrote:
> Hi Dick,
>
> Thank you very much for your valuable help!
>
> Indeed, now I'm able to create what I wanted using Option 1 as you can see in this link:
>
> https://dl.dropbox.com/u/6573328/hom_model2
>
> However, I would need to be able to set the viewing parameters such as inclination angle and scale (like in the 2D figure I showed before). Do you think this is possible within Option 1?
>
> Again, thank you for you help!
> Cheers,
> m.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: qualifying object classes on the fly
Next Topic: Re: qualifying object classes on the fly

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Nov 29 18:24:57 PST 2025

Total time taken to generate the page: 0.88465 seconds