Rendering a torus in Tachyon

I'm trying to figure out how to render a torus using Tachyon. The problem is that a solid torus requires a 2 variable parametric equation, and it seems Tachyon only likes to use single variable parametric equations. Is there a way around this?

edit retag close merge delete

Sort by ยป oldest newest most voted

Depending on how hard you want to work, you might be interested in extracting tachyon data from Graphics3d objects. This is the data rendered with the option viewer='tachyon', but you can modify lighting, camera, etc. before rendering.

This has been a long-time side goal of mine, but currently there's no totally automatic ways of doing it. Here are some things you can use to do it yourself though:

more

The following is working for me in Sage Math Cloud.

var('s t')
F=((2+1*cos(t))*cos(s),(2+1*cos(t))*sin(s),1*sin(t))
p=parametric_plot3d(F,(t,0,2*pi),(s,0,2*pi))
show(p,viewer='tachyon',aspect_ratio=1)
p.save('test.png',viewer='tachyon',aspect_ratio=1)


The downside is that you will have to transform the torus in order to change the view. I don't think you can change the viewpoint using the show or parametric_plot3d commands yet.

more

I think you're right. I've been able to use the tachyon viewer, but I'm trying to animate a series of nested tori, and was hoping to control tachyon directly. I've got the animation without it, but it would be nice to change the view and lighting.

( 2015-04-06 19:01:49 -0500 )edit