I lied. OK, see the JVXL file at

http://stolaf.edu/people/hansonr/chemapps/jmol/docs/misc/cone.jvxl

for a the surface z = sqrt(x^2 + y^2). Because it is a JVXL file, you can go
in and change the axes, change the scaling, change the origin, etc., and
have any cone you want. Even elliptical cones.

This was created at

http://chemapps.stolaf.edu/jmol/docs/examples-11/isosurface.htm?USSIGNEDAPPLET&topic=14

by entering

Math.sqrt(x^2 + y^2) into the input box, clicking the link discussed there
to "set the function" and then issuing the following on the command line:

javascript "x0=-5;y0=-5;dx=.2;dy=.2";isosurface functionXY "curveAsStringXY"
{-5 -5 -5} {-51 0.2 0 0} {51 0 0.2 0} {51 0 0 0.2};

followed by

write isosurface "cone.jvxl"


That instructs Jmol to get the Z coordinate of the function from the
JavaScript function curveAsStringXY, which reads:

function curveAsStringXY(app, nX, nY) {
  var i1 = Math.abs(parseInt(""+nX));
  var i2 = Math.abs(0.0 + parseInt(""+nY));
  var s = ""
  for (var i = 0; i < i1; i++)
    for (var j = 0; j < i2; j++) {
      s+= curveXY("",i, j) + "\n";
    }
  return s;

}


x0 = 0
y0 = 0
dx = 1
dy = 1
x = 0
y = 0

function curveXY(app, ix, iy) {
 setXY(ix, iy)
 return eval(myfunction);
}

function setXY(ix, iy) {
 x = ix * dx + x0
 y = iy * dy + y0
}


function setFunction(f,isSilent){
  myfunction = (arguments.length<1?document.getElementById("fOfXY").value:f)
  var x=1
  var y=1
  var z=NaN
  try{eval("z="+myfunction)}catch(e){alert(e)}
  if(isNaN(z)){
    alert("Your function is invalid")
    myfunction = "(x*x+y*y)"
  }
  try{curveXY("",1,1)}catch(e){alert(e);return}
  if (!isSilent)alert("The function Jmol will use is now z=" + myfunction)
}

myfunction = "(x*x + y*y)/3"
setFunction(myfunction,1)




On Fri, Oct 1, 2010 at 9:26 PM, Robert Hanson <hans...@stolaf.edu> wrote:

> Sorry, no good way to do that.
>
> On Fri, Oct 1, 2010 at 4:03 PM, Pshemak Maslak <p...@chem.psu.edu> wrote:
>
>>  How can I draw open right cones in Jmole?
>>
>> For example, how can draw the double cone for nodal surface of 3d(z^2)
>> orbital?
>>
>> Thanks, for your help.
>>
>> PM
>>
>>
>> ------------------------------------------------------------------------------
>> Start uncovering the many advantages of virtual appliances
>> and start using them to simplify application deployment and
>> accelerate your shift to cloud computing.
>> http://p.sf.net/sfu/novell-sfdev2dev
>> _______________________________________________
>> Jmol-users mailing list
>> Jmol-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/jmol-users
>>
>
>
>
> --
> Robert M. Hanson
> Professor of Chemistry
> St. Olaf College
> 1520 St. Olaf Ave.
> Northfield, MN 55057
> http://www.stolaf.edu/people/hansonr
> phone: 507-786-3107
>
>
> If nature does not answer first what we want,
> it is better to take what answer we get.
>
> -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
>



-- 
Robert M. Hanson
Professor of Chemistry
St. Olaf College
1520 St. Olaf Ave.
Northfield, MN 55057
http://www.stolaf.edu/people/hansonr
phone: 507-786-3107


If nature does not answer first what we want,
it is better to take what answer we get.

-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900



-- 
Robert M. Hanson
Professor of Chemistry
St. Olaf College
1520 St. Olaf Ave.
Northfield, MN 55057
http://www.stolaf.edu/people/hansonr
phone: 507-786-3107


If nature does not answer first what we want,
it is better to take what answer we get.

-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to