Page 1 of 1
Tutorial on drawing a 3D solid
Posted: 2008-01-17T02:20:54-07:00
by zomp
Is there anybody so kind to explain me how to use command-line tools and draw a 3D cylinder like the following one:
http://tbn0.google.com/images?q=tbn:vf9 ... linder.gif
but glass made (i.e., with some level of transparency)?
Many many thanks.
Your program is wonderful (even if a bit hard for a newbie as I am).
Re: Tutorial on drawing a 3D solid
Posted: 2008-01-17T06:29:52-07:00
by Bonzo
This is the sort of thing you want to do. You could probably add the gradiant by using a mask and overlaying it over a gradiant image.
Code to create a simple blue cylinder
Code: Select all
convert -size 300x500 xc:none -stroke black -strokewidth 1 -fill blue -draw \"rectangle 0,100 200,300\" -draw \"ellipse 100,300 100,50 0,180 \" -draw \"ellipse 100,100 100,50 0,360 \" test.png
After expanding the code to add a gradiant you can get this:
Re: Tutorial on drawing a 3D solid
Posted: 2008-01-17T15:58:26-07:00
by zomp
Bonzo wrote:This is the sort of thing you want to do. You could probably add the gradiant by using a mask and overlaying it over a gradiant image.
Code to create a simple blue cylinder
Code: Select all
convert -size 300x500 xc:none -stroke black -strokewidth 1 -fill blue -draw \"rectangle 0,100 200,300\" -draw \"ellipse 100,300 100,50 0,180 \" -draw \"ellipse 100,100 100,50 0,360 \" test.png
Thanks. I will open a new thread about transparent gradient.
Re: Tutorial on drawing a 3D solid
Posted: 2008-01-23T02:45:53-07:00
by anthony
Of course if you are wanting to deal with actual 3D objects (in the computer memory) then you are better off with a ray tracer. which is whole different kettle of fish.
POV (povray) is actually quite good at this, and is simple for simple objects. But getting though the language and 'possibilities' it provides, that is a problem. There are also lots ray tracing editors and other tools to help, but often still require you to know the fundamentals of ray tracing to use.
Not of these suggestions has anything to do with Image Magick, though IM is very good for preparation and post-processing work.