Ask Your Question
1

Rendering a torus in Tachyon

asked 2015-04-06 01:57:06 +0100

Jeff Ford gravatar image

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 flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2015-04-06 02:43:35 +0100

calc314 gravatar image

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.

edit flag offensive delete link more

Comments

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.

Jeff Ford gravatar imageJeff Ford ( 2015-04-07 02:01:49 +0100 )edit
1

answered 2015-04-07 21:05:53 +0100

niles gravatar image

updated 2015-04-07 21:06:21 +0100

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:

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-04-06 01:57:06 +0100

Seen: 786 times

Last updated: Apr 07 '15