POV-Ray : Newsgroups : povray.general : Export surface from Matlab to povray Server Time
1 Aug 2024 00:18:00 EDT (-0400)
  Export surface from Matlab to povray (Message 1 to 3 of 3)  
From: pierre
Subject: Export surface from Matlab to povray
Date: 22 Aug 2006 12:00:00
Message: <web.44eb29b21c091812ad334ed60@news.povray.org>
Hello everybody,
I am working on texture simulation, and I wanted to know if it is possible
to export a Matlab surface in Povray (extension .pov).
I have done my homework by searching on the internet, but the solution that
I founded don't work with the matlab version I have (7.0).
Besides I am not really in computer science, and I do need something simple
(just press a button is perfect for me!!).
By advance thank you very much.
Pierre


Post a reply to this message

From: Florian Brucker
Subject: Re: Export surface from Matlab to povray
Date: 24 Aug 2006 10:48:59
Message: <44edbc5b$1@news.povray.org>
Hi!

Which format is your surface in? I got no Matlab at the moment, but 
usually it would be something like this, right?

	x = [0:0.1:1];
	y = [-1:0.1:1];
	[X,Y] = meshgrid(x,y);
	Z = exp(X).*Y;

If that's the case, triangulation should be straightforward. I can put 
something together later (when I'm at a puter which has Matlab installed).

Even if you've got a finished surface displayed in a figure window it 
should be possible to export it without too much hassle, although it'll 
be slightly more complicated.

If you can give me some more details about what you need I'll see what I 
can do :)


Greetings,
Florian


Post a reply to this message

From: pierre
Subject: Re: Export surface from Matlab to povray
Date: 25 Aug 2006 04:30:00
Message: <web.44eeb4d13b86d99aad334ed60@news.povray.org>
Hi Florain, and thanks for your answer,

I partially solved my problem by using your method!
In fact I exported some surface (3D surface: only defined by the altitude
the size and the step)from an apparatus. Then I translated them into .txt,
read them with matlab. My goal was to simulate the lighting behaviour of
the surfaces using povray.
What I did , was to convert the surface (obtained with meshgrid) into a .obj
and then to a .pov using PosRay.


Greetings
Pierre

Florian Brucker <tor### [at] torfboldcom> wrote:
> Hi!
>
> Which format is your surface in? I got no Matlab at the moment, but
> usually it would be something like this, right?
>
>  x = [0:0.1:1];
>  y = [-1:0.1:1];
>  [X,Y] = meshgrid(x,y);
>  Z = exp(X).*Y;
>
> If that's the case, triangulation should be straightforward. I can put
> something together later (when I'm at a puter which has Matlab installed).
>
> Even if you've got a finished surface displayed in a figure window it
> should be possible to export it without too much hassle, although it'll
> be slightly more complicated.
>
> If you can give me some more details about what you need I'll see what I
> can do :)
>
>
> Greetings,
> Florian


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.