First time here? Check out the FAQ!

Ask Your Question
1

Rendering a torus in Tachyon

asked 10 years ago

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?

Preview: (hide)

2 Answers

Sort by » oldest newest most voted
1

answered 10 years ago

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.

Preview: (hide)
link

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 ( 10 years ago )
1

answered 10 years ago

niles gravatar image

updated 10 years ago

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:

Preview: (hide)
link

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: 10 years ago

Seen: 974 times

Last updated: Apr 07 '15