# Gizmo plots

Dear all

I have been using Igor for a very long time, but I never had to do any 3D graphics, so I simply ignored Gizmo...

Now I feel is the time to start learning this as well, let's say I want to figure out how to do a double cone (https://en.wikipedia.org/wiki/Cone#/media/File:DoubleCone.png).

The equation is z^2 = A*x^2 + B*y^2 and I am sure this is trivial to plot, but I get stuck... Can anyone give me just a pointer of how to start?

I think the best way to do this is to define two cylinders, one with its bottom radius set to 0, and the other with its top radius set to 0. That makes two cones. Then you can add a translation of z = -1 to one of the cones. Translation can be accessed in the Gizmo info window from the '+' button under the display list. You place the translation object above the objects you want it to affect.

This is some code to recreate what I did.

NewGizmo
AppendToGizmo cylinder={0,1,1,10,15},name=cylinder0
ModifyGizmo modifyObject=cylinder0,objectType=Cylinder,property={useGlobalAttributes,0}
ModifyGizmo modifyObject=cylinder0,objectType=Cylinder,property={normals,100000}
AppendToGizmo cylinder={1,0,1,10,15},name=cylinder1
ModifyGizmo modifyObject=cylinder1,objectType=Cylinder,property={useGlobalAttributes,0}
ModifyGizmo modifyObject=cylinder1,objectType=Cylinder,property={normals,100000}
ModifyGizmo setDisplayList=0, object=cylinder0
ModifyGizmo setDisplayList=1, opName=translate0, operation=translate, data={0,0,-1}
ModifyGizmo setDisplayList=2, object=cylinder1

Also, if you want some quick lighting settings so you can see the shapes better, use

`ModifyGizmo enhance`

and you can make the cylinder shapes smoother by increasing the number of slices

Hello Johan,

Ben's response tells you how to get a quick double cone but it does not explain how to construct it as a parametric surface.  The code for the special case of a double cone is actually provided in File Menu->Example Experiments->Visualization->Gizmo Sphere.  Open the main procedure file of the experiment and you will find the function makeDoubleCone().

I hope this helps,

AG