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

Home » Public Forums » archive » Re: Inner Hull
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: Inner Hull [message #80245 is a reply to message #80244] Fri, 18 May 2012 09:36 Go to previous message
cgguido is currently offline  cgguido
Messages: 195
Registered: August 2005
Senior Member
Can't you simplify your problem?

If you want the volume of a sphere that includes all points/excludes all points, can't you just take the point that is farthest/closest to the center, and use that as a radius?

This is the dum attempt I made to flip the circle inside out...

theta=randomu(s,100)*2*!pi
x=cos(theta)+randomu(s,100)*.2-.1
y=sin(theta)+randomu(s,100)*.2-.1
plot, x, y, /iso, ps=1, xr=[-1,1]*1.5, yr=[-1,1]*1.5, /xs, /ys

Triangulate, x, y, triangles, hull
Plots, [x[hull],x[hull[0]]], [y[hull],y[hull[0]]],$
color=cgcolor('green')

;This dumb idea ain't gonna work :-(
plot, 1./x,1./y,ps=1,title='Plotting the inverses'
Triangulate, 1./x, 1./y, triangles, hull
Plots, [1./x[hull],1./x[hull[0]]], [1./y[hull],1./y[hull[0]]],$
color=cgcolor('red')

plot, x, y, /iso, ps=1, xr=[-1,1]*1.5, yr=[-1,1]*1.5, /xs,$
/ys,title='These are the same guys in "regular" space.'
Plots, [x[hull],x[hull[0]]], [y[hull],y[hull[0]]],$
color=cgcolor('red')


-- Gianguido


On Friday, May 18, 2012 10:22:00 AM UTC-5, Ayla P wrote:
> Hi all,
>
> I'm hoping someone might have some insight into this problem i'm
> trying to solve. Hopefully I can make my questions coherent!
>
> The intent is pretty simple: I have a bunch of points that make up a
> sphere, and I want to calculate the volume of the sphere.
>
> The points are random and aren't in a single line that makes an edge,
> so I want to see how much the the volume of the sphere changes if I
> make a hull using the outer-side of the "rim" (outermost pixels)
> versus using the inner-side of the it (not all the interior pixels,
> but those that basically make up the inner side of the rim). I've made
> a convex hull around the outer pixels, but now I basically want to
> make an inner hull.
>
> Would it be possible to place the inner pixels on the outside and the
> outer pixels on the inside then just retrace a convex hull and then re-
> place the pixels into their original positions? If so, does anyone
> have a suggestion of how to do this? If not, does anyone have an
> alternative suggestion for how to get the inner hull?
>
> Thanks so much for the help!
>
> Ayla
[Message index]
 
Read Message
Read Message
Previous Topic: idl hangs when reading ascii file
Next Topic: Re: idl hangs when reading ascii file

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

Current Time: Wed Dec 03 01:49:29 PST 2025

Total time taken to generate the page: 0.17688 seconds