No subject
Tue Jun 23 12:19:35 EDT 2009
is pretty subtle. Loading both geometries in ParaView, it looks like car 0=
is slightly longer than car 1. When you set the camera in ParaView direct=
ly, you see this.
I think the problem with your script is that you are calling view.ResetCame=
ra() after setting up the camera. ResetCamera will dolly the camera to "fi=
t" the geometry in the view. So for the smaller car the camera will zoom i=
n a bit to make its bounds fill roughly the same space as the larger car. =
Consequently, the python-generated image of car 1 makes it look bigger.
For the python-generated images, the cars are actually about the same size =
in the image. I measured them both to be about 18 pixels from the left of =
the images and 31 pixels from the right. Car 1 might look a bit bigger bec=
ause its boxier shape fills its bounds more.
-Ken
On 6/27/09 9:28 AM, "David Doria" <daviddoria at gmail.com> wrote:
(Demo files are available here: http://www.rpi.edu/~doriad/Cars/ )
If I load 0.vtp and 1.vtp in paraview, set the camera focal point to (0,0,0=
), the camera position to (20, -20, 5), and the viewing angle to 45, the ca=
r in 0.vtp looks "bigger" than the car in 1.vtp. However, if I run the scri=
pt CreateThumbnails.py (in the above link) with these commands
./CreateThumbnails.py --input=3D0.vtp --rep=3DSurface --output=3Dpython_0.p=
ng --campos=3D20 -20 5
./CreateThumbnails.py --input=3D1.vtp --rep=3DSurface --output=3Dpython_1.p=
ng --campos=3D20 -20 5
in the resulting images car 1 looks bigger than car 0!! Is this some perspe=
ctive projection illusion? Or am I missing a camera parameter in the script=
that is making it look different? I feel like I may be doing something wro=
ng in the script because if I run this command
./CreateThumbnails.py --input=3D1.vtp --rep=3DSurface --output=3D1test.png =
--campos=3D1 -1 .25
(the difference is that campos is scaled), the exact same image is produced=
(as python_1.png). It seems like this one should be a zoomed in version a=
s the camera should be very close to the car.
Any thoughts?
Thanks,
David
**** Kenneth Moreland
*** Sandia National Laboratories
***********
*** *** *** email: kmorel at sandia.gov
** *** ** phone: (505) 844-8919
*** web: http://www.cs.unm.edu/~kmorel
--_000_C66E2A5BAADBkmorelsandiagov_
Content-Type: text/html;
charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
<HTML>
<HEAD>
<TITLE>Re: [Paraview] Discrepancy between paraview display and python rende=
ring</TITLE>
</HEAD>
<BODY>
<FONT FACE=3D"Calibri, Verdana, Helvetica, Arial"><SPAN STYLE=3D'font-size:=
11pt'>From your description, I was expecting to see something dramatic, but=
this is pretty subtle. Loading both geometries in ParaView, it looks=
like car 0 is slightly longer than car 1. When you set the camera in=
ParaView directly, you see this.<BR>
<BR>
I think the problem with your script is that you are calling view.ResetCame=
ra() after setting up the camera. ResetCamera will dolly the camera t=
o “fit” the geometry in the view. So for the smaller car =
the camera will zoom in a bit to make its bounds fill roughly the same spac=
e as the larger car. Consequently, the python-generated image of car =
1 makes it look bigger.<BR>
<BR>
For the python-generated images, the cars are actually about the same size =
in the image. I measured them both to be about 18 pixels from the lef=
t of the images and 31 pixels from the right. Car 1 might look a bit =
bigger because its boxier shape fills its bounds more.<BR>
<BR>
-Ken<BR>
<BR>
<BR>
On 6/27/09 9:28 AM, "David Doria" <<a href=3D"daviddoria at gmail=
.com">daviddoria at gmail.com</a>> wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE=3D"Calibri, Verdana, Helvetica, Arial"=
><SPAN STYLE=3D'font-size:11pt'>(Demo files are available here: <a href=3D"=
http://www.rpi.edu/~doriad/Cars/">http://www.rpi.edu/~doriad/Cars/</a> )<BR=
>
<BR>
If I load 0.vtp and 1.vtp in paraview, set the camera focal point to (0,0,0=
), the camera position to (20, -20, 5), and the viewing angle to 45, the ca=
r in 0.vtp looks "bigger" than the car in 1.vtp. However, if I ru=
n the script CreateThumbnails.py (in the above link) with these commands<BR=
>
<BR>
./CreateThumbnails.py --input=3D0.vtp --rep=3DSurface --output=3Dpython_0.p=
ng --campos=3D20 -20 5<BR>
./CreateThumbnails.py --input=3D1.vtp --rep=3DSurface --output=3Dpython_1.p=
ng --campos=3D20 -20 5<BR>
<BR>
in the resulting images car 1 looks bigger than car 0!! Is this some perspe=
ctive projection illusion? Or am I missing a camera parameter in the script=
that is making it look different? I feel like I may be doing something wro=
ng in the script because if I run this command<BR>
<BR>
./CreateThumbnails.py --input=3D1.vtp --rep=3DSurface --output=3D1test.png =
--campos=3D1 -1 .25<BR>
<BR>
(the difference is that campos is scaled), the exact same image is produced=
(as python_1.png).=A0 It seems like this one should be a zoomed in version=
as the camera should be very close to the car. <BR>
<BR>
Any thoughts?<BR>
<BR>
Thanks,<BR>
<BR>
David<BR>
<BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE=3D"Calibri, Verdana, Helvetica, Arial=
"><SPAN STYLE=3D'font-size:11pt'><BR>
</SPAN></FONT><FONT SIZE=3D"2"><FONT FACE=3D"Consolas, Courier New, Courier=
"><SPAN STYLE=3D'font-size:10pt'><BR>
**** Kenneth Moreland<BR>
*** Sandia National L=
aboratories<BR>
*********** <BR>
*** *** *** email: <a href=3D"kmorel at sandia.gov">kmorel at sandia.gov</a=
><BR>
** *** ** phone: (505) 844-8919<BR>
*** web: =
<a href=3D"http://www.cs.unm.edu/~kmorel">http://www.cs.unm.edu/~kmorel</a>=
<BR>
</SPAN></FONT></FONT><FONT FACE=3D"Calibri, Verdana, Helvetica, Arial"><SPA=
N STYLE=3D'font-size:11pt'><BR>
</SPAN></FONT>
</BODY>
</HTML>
--_000_C66E2A5BAADBkmorelsandiagov_--
More information about the ParaView
mailing list