[x3d-public] Pattern to drive algorithm to generate X3D procedurally

Brutzman, Donald (Don) (CIV) brutzman at nps.edu
Fri Sep 28 05:28:43 PDT 2018


On 9/27/2018 3:17 PM, Joseph D Williams wrote:
> Look at the old Chem ML, where we (Nicolas) demonstrated transformation from the highly structured chemical markup language used to model and document various chemical processes. Yes, the xslt took the chem markup and generated x3d user code that produced realtime graphical representations. So yes, if you have something that has an xml syntax, then …
> 
> Glad to see the interest,
> 
> Joe

Yes, great example.

======================================================================
X3D Example Archives: Basic, Chemical Markup Language
http://www.web3d.org/x3d/content/examples/Basic/ChemicalMarkupLanguage

Chemical Markup Language (CML) provides support for most chemistry including molecules, compounds, reactions, spectra, crystals and computational chemistry.

These examples show how to visualize _Chemical Markup Language (CML)_ [1] molecular definitions using previously designed X3D model prototypes by using an _XSLT stylesheet_ [2] transformations. This process is described in the paper "Stylesheet Transformations for Interactive Visualization: Towards a Web3D Chemistry Curricula," [3] originally published in Proceedings of Web3D 2003 Symposium, St. Malo France, 9-12 March 2003, ACM Press. [4]

[1] http://xml-cml.org
[2] http://www.web3d.org/x3d/content/examples/Basic/ChemicalMarkupLanguage/CmlToX3d.xslt
[3] http://www.web3d.org/x3d/content/examples/Basic/ChemicalMarkupLanguage/Polys.StylesheetTransformationsInteractiveVisualization.Web3d2003Symposium.pdf
[4] http://dl.acm.org/citation.cfm?id=636593&picked=prox&CFID=74553243&CFTOKEN=60897567
======================================================================

For example,
	http://www.web3d.org/x3d/content/examples/Basic/ChemicalMarkupLanguage/CaffeineIndex.html

Note that the CML .xml file is converted by an XSLT stylesheet into an X3D scene.  The visual pattern for ball-and-stick molecular visualization is repeatably presented using prototypes for each of the various atoms involved.  Textual information is also presented.  VRML, ClassicVRML, pretty=print HTML documentation, X_ITE/X3DOM, .json, .x3db and .java versions are all automatically produced from the .x3d version by various conversion tools that are utilized in the automated build process.

Images corresponding to scene viewpoints are also automatically produced.
http://www.web3d.org/x3d/content/examples/Basic/ChemicalMarkupLanguage/_viewpoints/Caffeine.x3d._VP_Inspect_Caffeine.png
http://www.web3d.org/x3d/content/examples/Basic/ChemicalMarkupLanguage/_viewpoints/Caffeine.x3d._VP_title_billboard.png
http://www.web3d.org/x3d/content/examples/Basic/ChemicalMarkupLanguage/_viewpoints/Caffeine.x3d._VP_Default_viewpoint.png

So design process overall is something like:
a. aha CML data is interesting, what does it really provide?
b. brainstorm how would i draw this molecule in X3D?
c. cool initial model
d. divide and conquer, create prototypes for repeatable/customizable parts (i.e. atoms)
e. evaluate a few prototype-based examples, essentially designing a template
f. format conversion from CML to X3D using XSLT stylesheet as production tool
g. generate multiple examples, debug and tune results by adjusting X3D patterns and XSLT mappings.
h. hip hip hooray, data-driven production pipeline for X3D visualization is now available!

This is a classic XML design process, shown here as an X3D exemplar.

Hmmm.  Looks like CML has continued to progress, they are now at schema v3 with a validator and tools and "more than 1 million lines of Open Source code" etc.  Perhaps the NIST Chemistry WebBook (NIST Standard Reference Database Number 69) might be applied as well.   Perhaps someone wants to upgrade this work, write a proposal to model every known molecule visually, create linkable online reference manuals using HTML/X3D, etc. etc.

[5] https://webbook.nist.gov/chemistry

No doubt such a data-driven asset would have great value in our medical-visualization work as well.  The possibilities indeed seem endless.

Have fun with X3D!  8)

> *From: *John Carlson <mailto:yottzumm at gmail.com>
> *Sent: *Friday, September 21, 2018 6:58 AM
> *To: *Tom Sparks <mailto:tom_a_sparks at yahoo.com.au>; Don Brutzman <mailto:brutzman at nps.edu>
> *Cc: *X3D Graphics public mailing list <mailto:x3d-public at web3d.org>
> *Subject: *Re: [x3d-public] Pattern to drive algorithm togenerateX3Dprocedurally
> 
> How might XSLT replace PROTOs?  I guess that’s the new design for the ProtoExpander?
> 
> Thanks,
> 
> John
> 
> Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
> 
> *From: *John Carlson <mailto:yottzumm at gmail.com>
> *Sent: *Friday, September 21, 2018 9:53 AM
> *To: *Tom Sparks <mailto:tom_a_sparks at yahoo.com.au>
> *Cc: *X3D Graphics public mailing list <mailto:x3d-public at web3d.org>
> *Subject: *RE: [x3d-public] Pattern to drive algorithm to generateX3Dprocedurally
> 
> Don, last question is for you.
> 
> So it seems like there’s something to:
> 
> Generative Modelling Language
> 
> Game Description Language
> 
> That might extend to Problem Modelling Language or Problem Description Language.
> 
> Hmm.
> 
> Could XSLT be used to generate or transform scenegraphs declaratively, functionally or procedurally to form new scenegraphs?
> 
> I am thinking of Generic Model Transformations from nearly a decade ago.
> 
> Thanks,
> 
> John
> 


all the best, Don
-- 
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman



More information about the x3d-public mailing list