Sorry, default isn't to reply all on this list.
Jason
moorepants.info
+01 530-601-9791
---------- Forwarded message ----------
From: Jason Moore <moorepa...@gmail.com>
Date: Mon, Dec 16, 2013 at 4:34 PM
Subject: Re: [MayaVi-users] How to transform and rotate parametric surfaces?
To: Roan LaPlante <aestri...@gmail.com>
I just want a quick way to draw primitives (tori, spheres, cones,
cylinders) in a scene with particular dimensions and be able to rotate and
translate them with respect to other objects I've created with mlab.mesh.
Ideally I'd like something like:
torus = mlab.Torus()
torus.center = [2., 3., 4.]
torus.orientation = [[0.1, 0.1, 0],
[0.2, 0.3, 0],
[0, 0, 1]]
torus.ring_radius = 5.0
torus.cross_section_radius = 0.2
mlab.show()
Does the tvtk or mayavi api offer anything like this?
Jason
moorepants.info
+01 530-601-9791
On Mon, Dec 16, 2013 at 4:21 PM, Roan LaPlante <aestri...@gmail.com> wrote:
> Hi Jason,
>
>
> What are you trying to do? In general, mayavi does not have universal and
> easily manipulable concepts of what space its visualizations occupy.
> Rather, sources occupy some space, and different sources vary extensively
> in how easily they are manipulated (mostly because they are not very
> featureful sources in vtk, and all mayavi does is wrap the vtk source).
>
> However, in general if you're unsatisfied with the API that mayavi
> provides you to work with your visualizations, its almost always possible
> to hack these further and effectively do some vtk programming. For
> instance, if you wanted to displace this torus in the x,y,z plane, you
> could edit the s.children[0].children[0].actor.actor.origin trait.
>
>
> R
>
>
> On Mon, Dec 16, 2013 at 3:19 PM, Jason Moore <moorepa...@gmail.com> wrote:
>
>> I've created torus like so:
>>
>> from mayavi import mlab
>> s = mlab.pipeline.parametric_surface()
>> s.function = 'torus'
>>
>> And can change it's geometry like:
>>
>> s.parametric_function.ring_radius = 10.0
>>
>> But how do I transform and locate the object in the main coordinate
>> system? I can't seem to figure this out...
>>
>> Jason
>> moorepants.info
>> +01 530-601-9791
>>
>>
>> ------------------------------------------------------------------------------
>> Rapidly troubleshoot problems before they affect your business. Most IT
>> organizations don't have a clear picture of how application performance
>> affects their revenue. With AppDynamics, you get 100% visibility into your
>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics
>> Pro!
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
>> _______________________________________________
>> MayaVi-users mailing list
>> MayaVi-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/mayavi-users
>>
>>
>
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
MayaVi-users mailing list
MayaVi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mayavi-users