It is currently Fri, 28-07-17, 0:44 GMT

All times are UTC




Post new topic Reply to topic  [ 134 posts ]  Go to page Previous  1 ... 4, 5, 6, 7, 8, 9  Next
Author Message
PostPosted: Tue, 04-02-14, 17:54 GMT 
Offline
Site Admin
User avatar

Joined: Thu, 30-08-07, 22:52 GMT
Posts: 2726
Location: France, South, not far from Montpellier
Cham wrote:
It's not really realistic, but still very beautifull.


Indeed, nice artistic vision!


Top
 Profile  
 
PostPosted: Fri, 07-02-14, 1:18 GMT 
Offline
User avatar

Joined: Sun, 02-09-07, 20:19 GMT
Posts: 196
Location: Montreal
I've found three very promising mathematical methods to build new nebulae models.

Eroding a distribution of points :
Randomly removing clusters of points, using two different methods, which gives some very different results :
Attachment:
erodedBall.jpg
erodedBall.jpg [ 90.45 KiB | Viewed 2024 times ]

Attachment:
erodedBall2.jpg
erodedBall2.jpg [ 68.53 KiB | Viewed 2024 times ]


Diffusion limited aggregation :
The results are very beautifull (fractal-like percolation) :
Attachment:
MDA.jpg
MDA.jpg [ 59.04 KiB | Viewed 2024 times ]

Unfortunately, this method is extremely slow with Mathematica. It could be much faster if programmed in C (which I don't know).

The method I used for the models shown on the previous pages is random walks.

_________________
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"


Last edited by Cham on Fri, 07-02-14, 2:23 GMT, edited 1 time in total.

Top
 Profile  
 
PostPosted: Fri, 07-02-14, 2:20 GMT 
Offline
User avatar

Joined: Sun, 02-09-07, 20:19 GMT
Posts: 196
Location: Montreal
Here's a first model from the Diffusion limited aggregation method. The model isn't good. It's just a "proof of concept" experimentation.
Attachment:
Percolation.jpg
Percolation.jpg [ 86.35 KiB | Viewed 2021 times ]

The fractal shape is clearly visible here. I have lots of parameters to play with. I could erode the shape using the eroding methods.

_________________
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"


Top
 Profile  
 
PostPosted: Fri, 07-02-14, 2:44 GMT 
Offline
User avatar

Joined: Sun, 02-09-07, 20:19 GMT
Posts: 196
Location: Montreal
The Mathematica code is improving fast !
This is the same distribution as the previous one. I changed the distribution of sprite size and colors :
Attachment:
Perco2.jpg
Perco2.jpg [ 77.22 KiB | Viewed 2020 times ]


EDIT : Ah ! A simple modification of the previous model already gave something very interesting, that I'm tempted to use somewhere in the universe!
(geez ! This experiment was supposed to be just a "proof of concept" for the Mathematica code !) :
Attachment:
Perco3.jpg
Perco3.jpg [ 65.51 KiB | Viewed 2019 times ]

_________________
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"


Top
 Profile  
 
PostPosted: Fri, 07-02-14, 11:13 GMT 
Offline
User avatar

Joined: Mon, 03-09-07, 23:01 GMT
Posts: 385
Location: Tuscany, Tyrrhenian Sea
Here there is the open-source libnoise library coded in c++; maybe you are able to discern the underlying noises math to port for Mathematica.
Note here one example of planetary surfaces tested in Celestia 1.3.1. ;)

_________________
Never at rest.


Top
 Profile  
 
PostPosted: Fri, 07-02-14, 14:55 GMT 
Offline
User avatar

Joined: Sun, 02-09-07, 20:19 GMT
Posts: 196
Location: Montreal
The percolation method already generates some beautifull models, but probably more pertinent in simulating supernova remnants. I'm getting something which is looking a bit like the Crab nebula without a shell. 4 views of the same percolation model :
Attachment:
protoypeA.jpg
protoypeA.jpg [ 85.49 KiB | Viewed 2004 times ]

Attachment:
protoypeB.jpg
protoypeB.jpg [ 79.14 KiB | Viewed 2004 times ]

Attachment:
protoypeC.jpg
protoypeC.jpg [ 81.66 KiB | Viewed 2004 times ]

Attachment:
protoypeD.jpg
protoypeD.jpg [ 77.14 KiB | Viewed 2004 times ]

_________________
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"


Top
 Profile  
 
PostPosted: Fri, 07-02-14, 17:10 GMT 
Offline
User avatar

Joined: Sun, 02-09-07, 20:19 GMT
Posts: 196
Location: Montreal
I think I'll use the percolation models as supernova remnants. 6 models :
Attachment:
PercoSN.jpg
PercoSN.jpg [ 207.48 KiB | Viewed 1999 times ]

and the pulsar in the middle of three of them :
Attachment:
PSR.jpg
PSR.jpg [ 169.08 KiB | Viewed 1999 times ]


EDIT : I didn't tried the eroding method yet. That could help in building more SN remnant models.

_________________
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"


Top
 Profile  
 
PostPosted: Sat, 08-02-14, 15:24 GMT 
Offline
User avatar

Joined: Sun, 02-09-07, 20:19 GMT
Posts: 196
Location: Montreal
This morning, I had the idea to define a degassing star using a percolation nebula model :
Attachment:
degastar1.jpg
degastar1.jpg [ 76.44 KiB | Viewed 1982 times ]

Attachment:
degastar2.jpg
degastar2.jpg [ 102.87 KiB | Viewed 1982 times ]


I find the result pretty. :)

Here's a small addon (that should work even with Celestia 1.6.1), to show the star above (the nebula model is very small !) :
Attachment:
Dejections.zip [132.18 KiB]
Downloaded 81 times

_________________
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"


Top
 Profile  
 
PostPosted: Sat, 08-02-14, 16:29 GMT 
Offline
User avatar

Joined: Sun, 02-09-07, 20:19 GMT
Posts: 196
Location: Montreal
I couldn't resist ! :lol:

A doomed world :
Attachment:
doomed1.jpg
doomed1.jpg [ 144.05 KiB | Viewed 1978 times ]

Attachment:
doomed2.jpg
doomed2.jpg [ 212.05 KiB | Viewed 1978 times ]

Attachment:
doomed3.jpg
doomed3.jpg [ 205.02 KiB | Viewed 1978 times ]


What a debauchery of sprites !

_________________
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"


Top
 Profile  
 
PostPosted: Sun, 09-02-14, 21:49 GMT 
Offline
Site Admin
User avatar

Joined: Fri, 31-08-07, 7:01 GMT
Posts: 4467
Location: Hamburg, Germany
Martin,

good idea to use a Diffusion Limited Aggregation (DLA) algorithm! I have been experimenting with DLA earlier in the context of rendering the conspicuous "dark lane" in edge-on view of spiral galaxies. I am also exploring the DLA algorithm for generating templates for irregular galaxies at very fast C++ level.

Question: in your example image from above:
Image

did you constrain the 3d points to a 3d lattice (integers!) or not? In any case the DLA - characteristic line-type aggregations (here for a 2d example)
Image

are missing in your above image, which is what we want, of course. Did you achieve this by stopping the active particle's 3d random walk (and adding a new particle), when the active particle came closer than some small distance to a fixed taget particle? Or did you just use/adapt one of the Mathematica code examples available in the net? Did you inject the new particles from a spherical surface or from a cube around the 3d structure?

Fridger

_________________
Image


Top
 Profile  
 
PostPosted: Mon, 10-02-14, 0:59 GMT 
Offline
User avatar

Joined: Sun, 02-09-07, 20:19 GMT
Posts: 196
Location: Montreal
t00fri wrote:
Did you achieve this by stopping the active particle's 3d random walk (and adding a new particle), when the active particle came closer than some small distance to a fixed taget particle? Or did you just use/adapt one of the Mathematica code examples available in the net? Did you inject the new particles from a spherical surface or from a cube around the 3d structure?


The iteration starts from a single point located at the origin. Then multiple Normal Gaussian walks start in any direction, one step at a time, with constraints so the paths doesn't cross the neighbors paths. I don't do this on a lattice anymore, because the lattice is visible in Celestia, even if the resolution is high and even after "pushing" each point at random.

Mathematica is highly ineficient at this kind of stuff. The DLA code is very slow. Random walks alone are MUCH faster, in comparison.

_________________
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"


Top
 Profile  
 
PostPosted: Mon, 10-02-14, 2:34 GMT 
Offline
User avatar

Joined: Sun, 02-09-07, 20:19 GMT
Posts: 196
Location: Montreal
Here's a sample of the new models, in Celestia (mostly SN remnant) :
Attachment:
PercoNeb.jpg
PercoNeb.jpg [ 354.17 KiB | Viewed 1948 times ]

Attachment:
FractalNeb2.jpg
FractalNeb2.jpg [ 216.89 KiB | Viewed 1948 times ]


Each model is unique.

_________________
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"


Top
 Profile  
 
PostPosted: Mon, 10-02-14, 10:56 GMT 
Offline
Site Admin
User avatar

Joined: Fri, 31-08-07, 7:01 GMT
Posts: 4467
Location: Hamburg, Germany
Cham wrote:
t00fri wrote:
Did you achieve this by stopping the active particle's 3d random walk (and adding a new particle), when the active particle came closer than some small distance to a fixed taget particle? Or did you just use/adapt one of the Mathematica code examples available in the net? Did you inject the new particles from a spherical surface or from a cube around the 3d structure?


The iteration starts from a single point located at the origin. Then multiple Normal Gaussian walks start in any direction, one step at a time, with constraints so the paths doesn't cross the neighbors paths.

Aha, that's not the 'canonical' DLA scenario where particles are moving-in from outside some characteristic distance from the central seed particle. The moving particles are attracted by the central target. The random walk stops either when the active particle collides with a target or gets sufficiently close at least.

Instead, your random walks propagate from the center outwards. But what makes them stop in this setting?? As you described it, the active particle gets increasingly distant from its starting position. It's a repulsive DLA variant so to speak.
Quote:

I don't do this on a lattice anymore, because the lattice is visible in Celestia, even if the resolution is high and even after "pushing" each point at random.

Mathematica is highly ineficient at this kind of stuff. The DLA code is very slow. Random walks alone are MUCH faster, in comparison.


Working with float positions is naturally much slower than using lattice-bound integer coordinates for the random walks. I am surprised that one can see the lattice structure for sufficiently big lattices. I suppose you read in your resulting shapes as CustomTemplates, right?

Maple offers a convenient automatism for substantial speed increase by auto-converting speed - critical procedures to C|C++|Fortran code and auto - compiling that code. The resulting object files can then be used like other procedures in Maple. I would be surprised if Mathematica doesn't offer this, too? In Maple the user doesn't need any detailed knowledge of C/C++/Fortran.

In celestia.Sci I code and optimize things of course directly in C++. But Maple | Mathematica is clearly a useful tool for exploring various alternatives.

Fridger

_________________
Image


Top
 Profile  
 
PostPosted: Mon, 10-02-14, 11:07 GMT 
Offline
User avatar

Joined: Sun, 02-09-07, 20:19 GMT
Posts: 196
Location: Montreal
t00fri wrote:
I am surprised that one can see the lattice structure for sufficiently big lattices. I suppose you read in your resulting shapes as CustomTemplates, right?


I'm not surprised. Celestia offers the possibility to zoom in on any object, enter it, move around, etc. Any defects can be seen.

t00fri wrote:
Maple offers a convenient automatism for substantial speed increase by auto-converting speed - critical procedures to C|C++|Fortran code and auto - compiling that code. The resulting object files can then be used like other procedures in Maple. I would be surprised if Mathematica doesn't offer this, too? In Maple the user doesn't need any detailed knowledge of C/C++/Fortran.

Yes, mathematica supports all this, but I don't use these features since I don't know C++ coding.

_________________
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"


Top
 Profile  
 
PostPosted: Mon, 10-02-14, 11:26 GMT 
Offline
Site Admin
User avatar

Joined: Fri, 31-08-07, 7:01 GMT
Posts: 4467
Location: Hamburg, Germany
Cham wrote:
t00fri wrote:
I am surprised that one can see the lattice structure for sufficiently big lattices. I suppose you read in your resulting shapes as CustomTemplates, right?


I'm not surprised. Celestia offers the possibility to zoom in on any object, enter it, move around, etc. Any defects can be seen.

Sure. But physicswise one always needs to impose a maximum "allowed" resolution.

Moreover, after reading in the templates, the C++ code first sorts and then re-shuffles the template points, before the proper rendering step starts. This simple measure usually is enough to wipe out all residual regular patterns from the making of the templates.
That's why I am surprised.
Quote:
t00fri wrote:
Maple offers a convenient automatism for substantial speed increase by auto-converting speed - critical procedures to C|C++|Fortran code and auto - compiling that code. The resulting object files can then be used like other procedures in Maple. I would be surprised if Mathematica doesn't offer this, too? In Maple the user doesn't need any detailed knowledge of C/C++/Fortran.

Yes, mathematica supports all this, but I don't use these features since I don't know C++ coding.

As I emphasized, you can profit from this feature WITHOUT knowing any C++.

Another superfast option exists in principle for NVIDIA graphics cards. One can use CUDA and perform the needed DLA algorithm in the GPU which accelerates the calculations by a huge factor...

Fridger

_________________
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 134 posts ]  Go to page Previous  1 ... 4, 5, 6, 7, 8, 9  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group