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

Home » Public Forums » archive » Re: Rasterize an image
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Rasterize an image [message #52317] Fri, 26 January 2007 13:47
Vince Hradil is currently offline  Vince Hradil
Messages: 574
Registered: December 1999
Senior Member
How about:

bmap = congrid(tvrd(),256,256)

On Jan 26, 3:39 pm, "Dave" <Confused.Scient...@gmail.com> wrote:
> Hi all,
>
> I suspect this is trivial (an IDL 2-liner) and I'm struggling on a
> Friday... I am trying to model what an image from a known object will
> look like using a low-res CCD detector. I can define the shape of the
> object being imaged in a simple equation and I know its radiant
> flux/color as a function of the radius. The trivial example below
> draws a circle and an ellipse using vectors. What I would like to know
> is what these would look like if I used a 256x256 array to image them.
> All tips, hints and examples greatly appreciated!
>
> Have a great weekend,
> Dave
>
> Example:
>
> np = 101
> grd = 2*findgen(np)/(np-1) - 1.0
>
> ; circle
> o = [-1.0, -4.0] ; offset
> r = 10.0 ; radius
> xc = r * grd
> yc = sqrt(r^2 - xc^2)
>
> xc_im = [xc[0:np-1],reverse( xc[0:np-1])] + o[0] ; make the half
> circle whole
> yc_im = [yc[0:np-1],reverse(-1*yc[0:np-1])] + o[1]
>
> ; elipse
> o = [2.0, 3.0] ; offset
> a = 11.0 ; x semi-axis
> b = 8.0 ; y semi-axis
> xe = a * grd
> ye = b/a * sqrt(a^2 - xe^2)
>
> xe_im = [xe[0:np-1],reverse( xe[0:np-1])] + o[0] ; make the half
> elipse whole
> ye_im = [ye[0:np-1],reverse(-1*ye[0:np-1])] + o[1]
>
> window, 0, xsize=600, ysize=600
> plot, xc_im, yc_im, xrange=[-15,15], yrange=[-15,15], /xstyle, /ystyle
> oplot, xe_im, ye_im
>
> end
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Rasterize an image
Next Topic: Re: Converting an ENVI image into a file that can be read by IDL

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

Current Time: Fri Oct 10 05:43:52 PDT 2025

Total time taken to generate the page: 0.16431 seconds