[x3d-public] Discussion of API to generate X3D documents, based on X3D ObjectModel and X3DSAIL

John Carlson yottzumm at gmail.com
Sun Feb 25 04:11:50 PST 2018

I also think it will be important to generate *invalid* documents, and a similar process or parameter will be added to generate invalid documents.

Further research beyond this will explore “Earth-like” documents, "Medically-correct”, “Medically-incorrect”, “Humanoid-like”, and “Physically-correct” documents, with probably a parameter or flag for each working group.   This is where it will be important for components to be well integrated into X3DJSAIL and the X3D unified object model.

If someone has already done research like this, let me know.

Please add these features to the X3DJSAIL wiki, if desired.



Sent from Mail for Windows 10

From: John Carlson
Sent: Sunday, February 25, 2018 6:12 AM
To: Don Brutzman; Roy Walmsley; Chandan Boruah
Cc: x3d-public at web3d.org
Subject: Discussion of API to generate X3D documents, based on X3D ObjectModel and X3DSAIL

So I’m starting to work an API to generate X3D documents. I think I want something based on X3DObject in X3DJSAIL, probably as an extension of X3DJSAIL, so your help would be appreciated.  I am thinking something like

X3DObject obj = X3DObject.generateSemiRandomScenegraph(seed);
X3DObject obj2 = X3DObject.generateCompleteScenegraph(seed);

Then similar to how toStringX3D() goes down through hierarchy, I would have a generate…Scenegraph(); at each node.  I would need some probabilistic or occurrence-based configuration to generate the number of children and which attributes get set and which nodes get generated.   My question becomes, how to I generate things which are dependent on each other?   Like DEF/USE, Routes, and IndexedFaceSet attributes, for example.  I think I can do this through something similar to validation, but I haven’t spent much time thinking about it--generateValid()???  Have you spent anytime thinking about it?

What do you think about extending X3DJSAIL, and how do I go about getting my changes integrated?   Should I start a similar independent stylesheet which just does generation?  Should I output a different language than Java?

Your thoughts are welcome!

The only reason I am doing this Is to test the schema.  If you have a better approach, let me know!

Also, if anyone has done any occurrence-based analysis of X3D documents, I would be eager to hear about it.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20180225/6edb918a/attachment.html>

More information about the x3d-public mailing list