[x3d-public] [x3dom-users] CSG for X3D and X3DOM (shaders)

Andreas Plesch andreasplesch at gmail.com
Mon Aug 10 12:05:12 PDT 2015


Hello John,

I came across this posting from earlier this year.

The animation can be accomplished with interpolator nodes within x3d:

http://andreasplesch.github.io/x3dom/planet/animated.xhtml

Adding layers with interactive, user manipulated sizes would lean itself to
DOM manipulation in x3dom and maybe the point of departure from x3d only
and therefore from other x3d browsers.

This brings up if x3d has a facility to dynamically create nodes or if all
nodes to be shown in a scene have to be available in the initial scene
graph. Presumably the workaround would be to include all nodes but not show
all.

I like how you use d3 with x3dom. Do you have other examples ?

(Geo)elevationgrids have reasonable default texture coordinates which map
the texture as one would more or less expect. It is always possible to
explicitly provide the texture coordinates for each grid point.

It looks like it is necessary to use TextureTransforms to apply texture to
arcclose2d or disk2d.

Dish seems to be an x3dom only node ?



On Tue, May 12, 2015 at 11:34 PM, John Carlson <yottzumm at gmail.com> wrote:

> Another thing I'd like input on is the best surface to texture with an
> image.  While maintaining a cross section.
> On May 12, 2015 8:10 PM, "John Carlson" <yottzumm at gmail.com> wrote:
>
>> Here’s my version with D3.js and disk2d.
>> http://coderextreme.net/earth/world.html Waiting for an X3D version
>> which animates layers like this—note the trickery with the lowest level--or
>> supports adding and subtracting layers (my next task).
>>
>> On May 10, 2015, at 3:29 PM, Andreas Plesch <andreasplesch at gmail.com>
>> wrote:
>>
>> Hi Andy,
>>
>> if the subject is the earth, the geo-nodes should be useful, and I
>> believe they were. The advantage here was mostly that GeoElevationGrid
>> allows partial grids to be used, and that one an use the real dimension of
>> the earth in meters. If you look closely you can see that the
>> GeoElevationGrid is actually an ellipsoid: there is a small gap at the
>> equator between the surface and the crust layer.
>>
>> ArcClose2D actually has startAngle and endAngle:
>>
>>
>> https://github.com/x3dom/x3dom/blob/master/src/nodes/Geometry2D/ArcClose2D.js
>>
>> although it is left out in the documentation:
>>
>> http://doc.x3dom.org/author/Geometry2D/ArcClose2D.html
>>
>> Disk2D has innerRadius and outerRadius but not startAngle and endAngle:
>>
>> http://doc.x3dom.org/author/Geometry2D/Disk2D.html
>> https://github.com/x3dom/x3dom/blob/master/src/nodes/Geometry2D/Disk2D.js
>>
>> This is how the spec. defines the node. But it would be nice to a have a
>> startAngle and endAngle for Disk2D as well. It seems like a small, natural
>> extension to be able to define incomplete disks. x3dom could implement it
>> first and then it could be added to the spec. officially.
>>
>> -Andreas
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On Sun, May 10, 2015 at 11:41 AM, Andy Yeh <a.yeh at qut.edu.au> wrote:
>>
>>> Hi Andreas,
>>>
>>> Thanks for the example. Good to know the Geo- nodes work.
>>>
>>> I guess Disk2D is an ArcClose2D with endAngle as 2*pi, so Disk2D does
>>> not have endAngle, it is to be a disk. The startAngle will be useful though
>>> for ArcClose2D and Arc2D. But there does not seem to have startAngle for
>>> them in x3dom??
>>>
>>>>>> Andy
>>>
>>> On 10 May 2015, at 12:10 pm, Andreas Plesch <andreasplesch at gmail.com>
>>> wrote:
>>>
>>> Hi there,
>>>
>>> here is a x3dom only way to show the sections. It uses GeoElevationGrids
>>> for the full southern hemisphere and the partial northern hemisphere, and a
>>> DEF group of layered ArcClose2Ds for the section which is then reUSEd in
>>> transforms.
>>>
>>> http://plaza-omega.codio.io/x3dom/planet/index.xhtml
>>>
>>> One could add onmouseover handlers to show info for each layer.
>>>
>>> It is curious that there is a ArcClose2D node but that the Disk2D node
>>> has not an option for a startAngle and endAngle which would have been
>>> useful here.
>>>
>>> -Andreas
>>>
>>>
>>> On Sat, May 9, 2015 at 12:31 PM, John Carlson <yottzumm at gmail.com>
>>> wrote:
>>>
>>>>
>>>> On May 9, 2015, at 10:58 AM, John Carlson <yottzumm at gmail.com> wrote:
>>>>
>>>> Perhaps you could describe how to do prototypes with VRmath2 with Logo.
>>>>
>>>>
>>>>
>>>> In other words, can you do it in Logo, only mentioning DISH once and
>>>> PIE once.
>>>>
>>>> John
>>>>
>>>> Best,
>>>>>>>> Andy :-)
>>>>
>>>> On 9 May 2015, at 10:04 am, John Carlson <yottzumm at gmail.com> wrote:
>>>>
>>>> Andy.  Thanks for your way.  It has helped.  I devised a little
>>>> animation with X3DOM and D3.js based on your ideas:
>>>> http://coderextreme.net/earth/world.html
>>>>
>>>> John
>>>>
>>>> On May 8, 2015, at 9:15 AM, Andy Yeh <a.yeh at qut.edu.au> wrote:
>>>>
>>>> Hi John,
>>>>
>>>> I used a different way to construct the earth cross section.
>>>> See my blog at https://vrmath2.net/content/earth-cross-section
>>>>
>>>>>>>> Andy :-)
>>>>
>>>> On 8 May 2015, at 6:51 pm, John Carlson <yottzumm at gmail.com> wrote:
>>>>
>>>> Thinking about this, it seems like this could be done with 2
>>>> extrusions, one per hemisphere.  Anyone want to give it a try?  I may get
>>>> to it eventually.
>>>>
>>>> John
>>>>
>>>> On May 7, 2015, at 11:28 PM, John Carlson <yottzumm at gmail.com> wrote:
>>>>
>>>> The earth.png is included in this email.   The source code is
>>>> http://coderextreme.net/earth/<earth.png>
>>>>
>>>> On May 7, 2015, at 11:17 PM, John Carlson <yottzumm at gmail.com> wrote:
>>>>
>>>> Based on the blog below, I developed a CSG Earth cross section with
>>>> Three.js.  Here it is http://coderextreme.net/earth/earth.png  Note
>>>> that I’d like to make my “addShell” function a part of some declarative
>>>> code (JSON, Collada, gilt, X3D or X3DOM, if they aren’t already there.
>>>>
>>>> John
>>>>
>>>> On May 7, 2015, at 3:06 PM, John Carlson <yottzumm at gmail.com> wrote:
>>>>
>>>> Here’s the example from the Learning Three.js blog.  Seems performant
>>>> enough:
>>>> http://learningthreejs.com/data/constructive-solid-geometry-with-csg-js/
>>>> I want to visualize the inner part of the earth.
>>>>
>>>> John
>>>>
>>>> On May 7, 2015, at 2:48 PM, John Carlson <yottzumm at gmail.com> wrote:
>>>>
>>>> This may be an alternate solution:
>>>>
>>>>
>>>> http://learningthreejs.com/blog/2011/12/10/constructive-solid-geometry-with-csg-js/
>>>>
>>>> http://evanw.github.io/csg.js/
>>>>
>>>> Is there any chance we can get X3DOM to support this, at least for a
>>>> limited number of shapes?  I want to build a cross section of the earth in
>>>> D3.js and X3DOM.
>>>>
>>>> Thanks!
>>>>
>>>> John
>>>>
>>>> On May 7, 2015, at 2:19 PM, John Carlson <yottzumm at gmail.com> wrote:
>>>>
>>>> Also:
>>>> https://www.comp.nus.edu.sg/~lowkl/publications/realtime_csg_vrst2010.pdf I
>>>> think for my visualization, spheres may be sufficient.
>>>>
>>>> John
>>>>
>>>> On May 7, 2015, at 1:55 PM, John Carlson <yottzumm at gmail.com> wrote:
>>>>
>>>> Given http://www.cc.gatech.edu/~jarek/blister/Blister.pdf
>>>>
>>>> Is the comment about constructive solid geometry (CSG) below still
>>>> valid?
>>>>
>>>> http://www.web3d.org/wiki/index.php/CAD_Working_Group_Strategy
>>>>
>>>> Is it a matter of IP?  Graphics cards?
>>>>
>>>> Is anyone doing CSG with X3D or X3DOM?  Thanks!
>>>>
>>>> Thanks,
>>>>
>>>> John
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> One dashboard for servers and applications across
>>>> Physical-Virtual-Cloud
>>>> Widest out-of-the-box monitoring support with 50+ applications
>>>> Performance metrics, stats and reports that give you Actionable Insights
>>>> Deep dive visibility with transaction tracing using APM Insight.
>>>>
>>>> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y_______________________________________________
>>>> X3dom-users mailing list
>>>> X3dom-users at lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/x3dom-users
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> One dashboard for servers and applications across Physical-Virtual-Cloud
>>>> Widest out-of-the-box monitoring support with 50+ applications
>>>> Performance metrics, stats and reports that give you Actionable Insights
>>>> Deep dive visibility with transaction tracing using APM Insight.
>>>> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>>>> _______________________________________________
>>>> X3dom-users mailing list
>>>> X3dom-users at lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/x3dom-users
>>>>
>>>>
>>>
>>>
>>> --
>>> Andreas Plesch
>>> 39 Barbara Rd.
>>> Waltham, MA 02453
>>>
>>>
>>>
>>
>>
>> --
>> Andreas Plesch
>> 39 Barbara Rd.
>> Waltham, MA 02453
>> _______________________________________________
>> x3d-public mailing list
>> x3d-public at web3d.org
>> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>>
>>
>>


-- 
Andreas Plesch
39 Barbara Rd.
Waltham, MA 02453
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20150810/a1584eed/attachment-0001.html>


More information about the x3d-public mailing list