teaching leave. :)
Philip Bays wrote:
Cute. But you spent all weekend on that!! Someone has too much time
on his hands :-)
Phil
On Oct 10, 2005, at 12:27 PM, Bob Hanson wrote:
OK, here you go. Jmol as a 3D Sudoku visualizer.
As we say in Minnesota, "different".
http://www.stolaf.edu/people/hansonr/sudoku
Jmol is being used for the "3D view". The code is writing the applet
using innerHTML the "new" way that Jmol.js can now do, adding a
loadInline parameter to the tag so that both the data and the script
can be actuated simultaneously. The applet is not there initially,
only when requested. The display of different sections of the data is
simply done by "selecting" specific "atoms" and displaying them or
not. The simple function that adds the parameter to the
Jmol.js-boilerplate HTML is:
function addParam(sappcode,sname,svalue){
return sappcode.replace(/\<param/,"<param name=\""+sname+"\"
value=\""+svalue+"\" />\n<param")
}
where "sappcode" is the code returned from jmolApplet:
jmolSetDocument(0)
var s=jmolApplet(450,"set perspectivedepth OFF;"+script)
s=addParam(s,"loadInline",smodel.replace(/\n/g,"|"))
s=addParam(s,"messageCallback","clickModel")
document.getElementById("apphere").innerHTML=s
Bob
Bob Hanson wrote:
This is going to sound totally off topic, but bear me out.
Has anyone gotten into Sudoku? http://en.wikipedia.org/wiki/Sudoku
I've just realized that Jmol is the perfect application for
demonstrating the fundamental set-based mathematics of Sudoku.
The idea is to solve the Sudoku VISUALLY -- no numbers -- using a 9x9x9
block of "atoms" and message callbacks.
I know, it sounds totally ridiculous.
Bob
--
Robert M. Hanson, [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>,
507-646-3107
Professor of Chemistry, St. Olaf College
1520 St. Olaf Ave., Northfield, MN 55057
mailto:[EMAIL PROTECTED]
http://www.stolaf.edu/people/hansonr
"Imagination is more important than knowledge." - Albert Einstein
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Jmol-users mailing list
[email protected] <mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/jmol-users
J. Philip Bays
Department of Chemistry and Physics
Saint Mary's College
Notre Dame IN 46556
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
--
Robert M. Hanson, [EMAIL PROTECTED], 507-646-3107
Professor of Chemistry, St. Olaf College
1520 St. Olaf Ave., Northfield, MN 55057
mailto:[EMAIL PROTECTED]
http://www.stolaf.edu/people/hansonr
"Imagination is more important than knowledge." - Albert Einstein
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users