[x3d-public] Sophisticated plotting progress in X3DOM, "The imaginary part of the high-harmonic cutoff"

Andreas Plesch andreasplesch at gmail.com
Fri Jul 28 11:26:44 PDT 2023


Hi Emilio,

Please do not hesitate to ask any X3D or x3dom related questions here or
over at the x3dom github repository when you have a chance to work on your
new project as these are sure to crop up. Identifying and then resolving
issues ultimately helps all of the community. The x3dom transparency
problem was ultimately related to how the GPU was instructed on the lowest
layer. There are still many other transparency issues related to how GPU
rendering uses a simplistic model of light behaviour rather than ray
tracing.

I do think a small notebook showing useful processing of the raw X3D export
could be really helpful to Mathematica users. Sharing a downloadable
version here or perhaps at Mathematica community forums, potentially from a
dedicated github repo would seem most beneficial.

If you want to go one step further, submitting a 'polishX3D' or
'processX3D' function at the Mathematica Function Repository, could be very
helpful to the community. Currently, there do not seem be X3D related
functions available:

https://resources.wolframcloud.com/FunctionRepository/search/?i=X3D

I saw Mathematica notebooks can use python. If you know python, there is a
good python library X3D.py authored by Don which can be very convenient in
constructing well formed X3D documents.

Thanks again for sharing the beautiful 3d plots ! Andreas



On Fri, Jul 28, 2023 at 10:30 AM Emilio Pisanty <emilio.pisanty at kcl.ac.uk>
wrote:

> Hi all,
> First of all, thanks to Don for the kind words!
>
> Indeed, the models were created in Wolfram Mathematica, with some amount
> of post-processing for polish.
>
> Overall, Mathematica has grown into an extremely powerful tool for
> creating and manipulating 3D models in a broad range of scientific fields,
> for figures coming from both numerical data and analytical formulas.
>
> The X3D exporter from Mathematica is generally quite good! It has a few
> wrinkles where the primitives of X3D and Mathematica's Graphics3D don't
> align, but those can be worked around. The exporter does have some up-front
> bugs that mean that a small amount of post-processing is always required
> (IIRC a black background and including weird lights; implemented as
> cleanX3Dscene in the generator notebook deposited in Zenodo) but this is
> minimal.
>
> (If there is interest I can trim down the code there to create a minimal
> working example to export from a simple plot out to working X3D.)
>
> A similar example of generating X3D from Mathematica may be found at
> https://slalomincomplextime.github.io/, with the generating notebooks at
> https://zenodo.org/record/46912. Some of these are quite simple (direct
> export of a surface generated by Mathematica) while others are more
> involved (explicit creation of the X3D using Mathematica's XML package).
>
> In any case, huge thanks to the developers who continue to work on the
> x3dom library and who have brought the improvements that solve the
> transparency issues from ~3 years ago. I will embark on a similar project
> over the next year, which will hopefully give good opportunities to test
> the new behaviour in anger.
>
> Kind regards,
> Emilio Pisanty
>
> --
> Dr Emilio Pisanty
> Royal Society University Research Fellow
> Photonics & Nanotechnology Group
> King's College London
> Pronouns: he/him
>
>
>
> On 28/07/2023 00:27, Andreas Plesch wrote:
>
>
> You don't often get email from andreasplesch at gmail.com. Learn why this is
> important <https://aka.ms/LearnAboutSenderIdentification>
>
> I was also curious and found that quite a bit of post-processing was done,
> inside a Mathematica notebook. The generator zenodo link in the meta data
> has the notebook. Xml made this quite possible.
>
> Andreas
>
>
> On Thu, Jul 27, 2023, 5:27 PM John Carlson <yottzumm at gmail.com> wrote:
>
>> Looks like Wolfram Mathematica was used to initially create the
>> visualization?  Was there post-processing done?  I’m interested in
>> Mathematica, but probably 20+ years ago it was insufficient to do my
>> plotting.  Ms. Gorjanc from Zagreb’s work with Mathematica showed that such
>> things might be possible now.
>>
>> If someone wants to test Mathematica a bit, try plotting:
>>
>> r = A + B * cos (C * theta) * cos (D * phi)
>>
>> in spherical coordinates.  A,B,C and D parameters vary over time.
>>
>> My work is shown here: https://coderextreme.net/
>>
>> I have some visualizations where people can vary the parameters on a web
>> page, thanks to X3DOM’s sliders, which i can’t access right now, but is
>> viewable as part of X3DJSONLD:
>> https://coderextreme.net/X3DJSONLD/src/main/html/sphere.html
>>
>> My shaders for X3DOM are available in X3DJSONLD under src/main/shaders
>> (thanks to Holger, Yvonne and Mick). I can’t achieve anything near this
>> speed in pure ECMAScript.    Generating random numbers with a particle
>> system might be possible.
>>
>> Joe, the editor has been featured before…I’m not sure why you haven’t
>> seen it.
>>
>> If anyone wants to work on multi-user visualization, please let me know.
>>   I have experience with socket.io, but I don’t have a server for
>> communication right now.  Christoph V?  Anyone?  Netlify?  SubZero?   I’ll
>> need to modify server-side code or just do multicasting.   A simple
>> multiuser forwarding server is all that is needed.  I don’t want extra
>> server or any multicast setup.  Something as simple as IRC I can work with,
>> I think, but I haven’t tried JavaScript IRC.  Perl and Java, yes.
>>
>> Thanks for listening.
>>
>> John
>>
>> On Thu, Jul 27, 2023 at 3:14 AM Brutzman, Donald (Don) (CIV) <
>> brutzman at nps.edu> wrote:
>>
>>> Plotting in X3DOM is achieving pretty amazing capabilities.  Full-screen
>>> images illustrate how the model is providing excellent interactive
>>> visualizations.  Added here is link to a hi-resolution image captured on a
>>> cell phone, where the 3D plot is viewable and manipulable even on a small
>>> screen.
>>>
>>>
>>>
>>>    -
>>>    https://andreasplesch.github.io/Library/Viewer/index.html?url=https://gist.githubusercontent.com/andreasplesch/7716cf62d552a92504f704c6512b1738/raw/37eda2caeaa9a37ec712c93239485fc9385ce394/imaginary-harmonic-cutoff-figureOc_alpha.x3d
>>>    -
>>>    https://user-images.githubusercontent.com/7712992/256463049-9fb079f8-95a7-4e07-875b-37483bd92de2.png
>>>
>>>
>>>
>>> Model metadata, excerpted:
>>>
>>>
>>>
>>> <X3D profile='Immersive' version=’3.0’
>>>
>>>     xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance'
>>>
>>>     xsd:noNamespaceSchemaLocation='
>>> http://www.web3d.org/specifications/x3d-3.0.xsd'>
>>>
>>> <head>
>>>
>>>   <meta name='creator' content='Emilio Pisanty' />
>>>
>>>   <meta name='created' content='Thu 26 Mar 2020 19:16:33' />
>>>
>>>   <meta name='title'
>>> content='imaginary-harmonic-cutoff-figureOc_alpha.x3d'/>
>>>
>>>   <meta name='description' content='3D Fig. 1c in Pisanty et al, 2020'/>
>>>
>>>   <meta name='modifier' content='Andreas Plesch'/>
>>>
>>>   <meta name='modified' content='26 July 2023'/>
>>>
>>>   <meta name='reason' content='transparency'/>
>>>
>>>   <meta name='reference' content='
>>> https://imaginary-harmonic-cutoff.github.io'/>
>>>
>>>   <meta name='reference' content='https://doi.org/10.5281/zenodo.3758483
>>> '/>
>>>
>>>   <meta name='reference' content='
>>> https://doi.org/10.1088/2515-7647/ab8f1e'/>
>>>
>>>   <meta name='reference' content='https://arxiv.org/abs/2003.00277v2'/>
>>>
>>>   <meta name='reference' content='The imaginary part of the
>>> high-harmonic cutoff. E. Pisanty, M.F. Ciappina and M. Lewenstein. J. Phys.
>>> Photonics 2, 034013 (2020), arXiv:2003.00277.'/>
>>>
>>>   <meta name='rights' content='© Emilio Pisanty, 2020'/>
>>>
>>>   <meta name='subject' content='Photonics: The imaginary part of the
>>> high-harmonic cutoff'/>
>>>
>>>   <meta name='identifier' content='
>>> https://gist.github.com/andreasplesch/7716cf62d552a92504f704c6512b1738#file-imaginary-harmonic-cutoff-figureoc_alpha-x3d
>>> '/>
>>>
>>>   <meta name='generator' content='Wolfram Mathematica
>>> https://www.wolfram.com/mathematica'/>
>>>
>>>   <meta name='generator' content='https://doi.org/10.5281/zenodo.3692562
>>> '/>
>>>
>>>   <meta name='license' content='CC BY-SA 4.0
>>> https://creativecommons.org/licenses/by-sa/4.0'/>
>>>
>>> </head>
>>>
>>>
>>>
>>> from thread
>>>
>>>    - Patchy appearance of semi-transparent objects where they lie
>>>    behind themselves
>>>    - https://github.com/x3dom/x3dom/issues/1053
>>>
>>>
>>>
>>> Totally impressive, feels like multiple major steps forward.
>>> Congratulations and thanks to the model authors and x3dom team!
>>>
>>>
>>>
>>> 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
>>> https://faculty.nps.edu/brutzman
>>>
>>>
>>> _______________________________________________
>>> x3d-public mailing list
>>> x3d-public at web3d.org
>>> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>>>
>>
>

-- 
Andreas Plesch
Waltham, MA 02453
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20230728/9b9478f8/attachment-0001.html>


More information about the x3d-public mailing list