[vtkusers] scale viewport?

alethea alethea at anatomage.com
Wed Jan 15 13:23:50 EST 2014


Ah, okay. Then I'd definitely stick with what you're doing. Don't use the
rendering engine to mess with your data, I'd call that bad coding practice.
You might think about it this way:

Axis: maps data range (0-100mph) to world space (0-10 scene units)

If you have 3 axes, you can store different units and ranges for each, and
each axis computes where to put a point value in x,y,z scene units.

Hope that helps!


José Eduardo Meireles wrote
> Sorry for the slightly unclear description of my intent. The goal
> really is to change change aspect ration of the scene.
> 
> Say I have spheres representing attributes of driving conditions. Data
> is coming in different units with wildly different magnitudes for the
> different axis (say X is ~ to speed, Y is ~ to number of people in the
> car, and Z ~ to driver's age). As such, passing untransformed data as
> coordinates can result in really bad plots, where spheres are is too
> spread out or too clustered along one axis.
> 
> What I am doing is scaling the data before it gets passed to sphere
> source, and it works ok, but I wonder it that is the canonical way of
> doing it or if there's a better solution.
> 
> 
> 
> 
> On Wed, Jan 15, 2014 at 12:32 PM, alethea <

> alethea@

> > wrote:
>> It's a little unclear why you are trying to scale the scene.
>> Have you considered simply changing the vtkCamera setup? Use Zoom if you
>> are
>> using a perspective camera, or SetParallelScale if you are using Parallel
>> projection.
>>
>>
>> José Eduardo Meireles wrote
>>> Dear List,
>>> Sorry for the beginners' question.
>>> I am wondering if there's an easy way of scaling a scene without
>>> directly scaling the data coordinates (which is what I'm doing right
>>> now) and keeping each actor's geometry intact ( not making a pancake
>>> out of a sphere).
>>> Thanks a lot!
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the VTK FAQ at:
>>> http://www.vtk.org/Wiki/VTK_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://vtk.1045678.n5.nabble.com/scale-viewport-tp5725389p5725413.html
>> Sent from the VTK - Users mailing list archive at Nabble.com.
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers





--
View this message in context: http://vtk.1045678.n5.nabble.com/scale-viewport-tp5725389p5725421.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list