<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style></head><body lang=EN-US link=blue vlink="#954F72"><div class=WordSection1><p class=MsoNormal>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</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>X3DObject obj = X3DObject.generateSemiRandomScenegraph(seed);</p><p class=MsoNormal>X3DObject obj2 = X3DObject.generateCompleteScenegraph(seed);</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>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?</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>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?</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Your thoughts are welcome!</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>The only reason I am doing this Is to test the schema.  If you have a better approach, let me know!</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Also, if anyone has done any occurrence-based analysis of X3D documents, I would be eager to hear about it.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>John</p><p class=MsoNormal><o:p> </o:p></p></div></body></html>