Re: 3D Model of a Bitmap
- To: mathgroup at smc.vnet.net
- Subject: [mg105468] Re: 3D Model of a Bitmap
- From: dh <dh at metrohm.com>
- Date: Fri, 4 Dec 2009 04:31:25 -0500 (EST)
- References: <hf86r7$19r$1@smc.vnet.net>
Tobias Baumann wrote:
> Hello
>
> I have a complicated problem and I don't know whether it is doable.
>
> I've got an Bitmap containing a power profile of a laserbeam (i.e.
> cross-profile). If I plot this profile with ArrayPlot it would look like
> this
>
> |
> |
> -------
> |
> |
>
> Now I want to make an three dimensional model of this imported bitmap,
> to show it with Graphics3D, with a given height.
>
> I think one solution can be to transform every pixel in coordinates for
> the 3D-Plot and take this coordinate and build with Cuboid[] my desired
> body. You can imagine that every pixel, should now be a long cuboid. But
> I have bitmaps with 200x200 pixels or more, so I need 40000 cuboids and
> that's much too slow for my project.
>
> Is there any other possibility to create an three dimensional body with
> constant high and the topview as image information?
>
> I also have an interpolated function of my laserprofile, which looks
> like: LaserProfile[x,y]. I put in the coordinates and get out the power
> values if the laser has some at (x,y) and zero if not.
>
> Thanks a lot!
>
> Cheers Tobias
>
> PS: I hope my english is understandable. If not I try to make some
> better sentences.
>
Hi Tobias,
I do not understand fully what you try to achieve. You have 2D picture
that you want to project on 200<200 cuboids all with the same height?
But this makes one single cuboid???
Maybe, what you want is a 3D plot of your power density function. This
you can get by:
Plot3D[LaserProfile[x,y],{x,xmin,xmax},{y,ymin,ymax}]
Daniel