How to change the maximal grid size?

 
Post new topic   Reply to topic    K3DSurf forum Forum Index -> How to
View previous topic :: View next topic  
Author Message
jolkaP



Joined: 17 Oct 2011
Posts: 12
Location: Marseille (France)

PostPosted: Fri Mar 06, 2015 9:35 am    Post subject: How to change the maximal grid size? Reply with quote

Hello,

By default, MathMod allows going at maximum grid size 500 for Isosurfaces.

I need more for a specific project. I am trying to make a printable stl file for this surfaces.

(It comes from Herwig Hauser's gallery at http://imaginary.org)

When going up to 500 grid size, MathMod does not "view" the singular point (0,0,0). I would like to try with bigger sizes. I work on Mac but I am not used to this system, so please, answer with details.

JP[/img]
Back to top View user's profile Send private message
nextstep
Site Admin


Joined: 06 Jan 2007
Posts: 539

PostPosted: Sat Mar 07, 2015 3:11 pm    Post subject: Reply with quote

Hi,
I'm not sure which version you're using under Mac since MathMod's Mac versions are outdated.
MathMod has no limit for the grid maximum and this can be modified via mathmodconfig.js file:
Quote:
{
"IsoParam": {
"MaxGrid": 250,
"MaxPt": 5,
"MaxTri": 10
},
"WindowPosition": {
"ControlX": 20,
"ControlY": 20,
"GlwinX": 580,
"GlwinY": 20
},
"WindowSize": {
"ControlH": 700,
"ControlW": 538,
"GlwinH": 700,
"GlwinW": 780
},

"Styles": {
"StylesPredefined": [ "Default", "Fusion", "Windows","WindowsXp"],
"StyleUsed": "Default"
},

"Themes": {
"ThemesPredefined": [ "Default", "Dark", "MyTheme"],
"ThemeUsed": "Default",
"MyTheme": {
"Window":[53,53,53],
"WindowText":[255, 255, 255],
"Base":[15,15,15],
"AlternateBase":[53,53,53],
"ToolTipBase":[255, 255, 255],
"ToolTipText":[255, 255, 255],
"Text":[2, 2, 255],
"Button":[53,53,53],
"ButtonText":[255, 255, 255],
"BrightText":[255, 0, 0],
"Highlight":[142,45,197],
"HighlightedText":[0, 0, 0]
}
}
}


The specific parameter for the Grid maximum setting is :
Quote:
"IsoParam": {
"MaxGrid": 250,
"MaxPt": 5,
"MaxTri": 10
}


This method has the disadvantage of using big amounts of the RAM memory.
There are other ways, more powerful and less memory demanding, to rise the resolution of you whole model or just a region of the 3D space occupied by your model: This can be achieved by splitting your model from 2 to 1000 pieces and generate each piece to the nominal maximum grid resolution.
in other words, without changing any config file, you can already go up to 10*500 x 10*500 x 10*500 = 5000*5000*5000.
_________________
Cheers,
Abderrahman


Last edited by nextstep on Sat Mar 07, 2015 11:06 pm; edited 2 times in total
Back to top View user's profile Send private message
nextstep
Site Admin


Joined: 06 Jan 2007
Posts: 539

PostPosted: Sat Mar 07, 2015 5:00 pm    Post subject: Reply with quote

A quick example that split your model into four parts.
It's already good for showing good details on screen but for an STL mesh, there still some work to do for "merging" the four generated mesh in a unique one...
Quote:
{
"Iso3D": {
"Cnd": [
"((x-1)^2+(y+.5)^2+z*z-25)>0",
"((x-1)^2+(y+.5)^2+z*z-25)>0",
"((x-1)^2+(y+.5)^2+z*z-25)>0",
"((x-1)^2+(y+.5)^2+z*z-25)>0"
],
"Component": [
"obj1",
"obj2",
"obj3",
"obj4"
],
"Fxyz": [
"x*x*y*z+x*x*z*z+2*y*y*y*z+3*y*y*y",
"x*x*y*z+x*x*z*z+2*y*y*y*z+3*y*y*y",
"x*x*y*z+x*x*z*z+2*y*y*y*z+3*y*y*y",
"x*x*y*z+x*x*z*z+2*y*y*y*z+3*y*y*y"
],
"Name": [
"Schwartz"
],
"Xmax": [
"6",
".05",
"6",
".001"
],
"Xmin": [
"-4",
"-.05",
"-4",
"-.001"
],
"Ymax": [
"4.5",
".5",
".3",
".5"
],
"Ymin": [
"-5.5",
"-.5",
"-.1",
"-.5"
],
"Zmax": [
"5",
"0",
".1",
"0"
],
"Zmin": [
"-5",
"-5",
"-.1",
"-5"
]
}
}

_________________
Cheers,
Abderrahman
Back to top View user's profile Send private message
jolkaP



Joined: 17 Oct 2011
Posts: 12
Location: Marseille (France)

PostPosted: Mon Mar 09, 2015 8:42 pm    Post subject: Thank you! Reply with quote

Oh, thank you so much for the second solution. Even with the default maximum of 150 grid, it gives a nice rendering. Before your answer, the only way I had to work out through this kind of singular points which are not clearly computed was to pass through a parametrization. But for MIAU surface, it was difficult to find a nice parametrization.

(For the first solution, well, I have no idea how to use it because I don't know where this configuration file mathmodconfig.js is located on a mac).
Back to top View user's profile Send private message
nextstep
Site Admin


Joined: 06 Jan 2007
Posts: 539

PostPosted: Tue Mar 10, 2015 1:23 am    Post subject: Reply with quote

Hi,
I forget to mention that MathMod can generate the needed scripts to increase the resolution of your model. I'll show how to make the attached script render your model with better resolution at only a grid of 100, without having to write any new script:
1) render the last attached script with 4 components (Obj1, obj2, obj3 and obj4) with a lower resolution, say grid = 30
2) Make sure that "Obj1" is the selected component
3) go to ModelsDetails-->Grid-->"Multiplier(script generator)" and change:
X--> 3, Y --> 3 and Z --> 3
4) Click on the "Generate" button
Now, increase the grid resolution to 100 and recalculate your mathematical model. the resulting model should look better now at a grid of 100 than the original script at 150. This is because the component "Obj1" was split to 3*3*3=9 small components. This process can be repeated for any given component that doesn't render well on the screen. This way you can pinpoint exactly what region of your model need to be rendered with better resolution.
MathMod will generate config files in a directory that was given as a parameter, if no config file was found. It will also read and load config files found in the same directory given as a parameter:
The command line can be like this:
MathMod.exe /root/desktop/MathModDirectory/
Hope this can help!
_________________
Cheers,
Abderrahman
Back to top View user's profile Send private message
Furan



Joined: 05 Oct 2010
Posts: 64
Location: Prague, Czech Republic

PostPosted: Thu Mar 12, 2015 5:30 am    Post subject: Reply with quote

Hi,
I'm not sure if this is what you want, but try an odd number of grid samples for all x, y and z, so that one of the points is precisely at [0,0,0]. It needs a bit of computing, but you can even scale the limits and grid samples to hit two or more singularities at the same time.
Back to top View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    K3DSurf forum Forum Index -> How to All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


2005 Powered by phpBB © 2001, 2005 phpBB Group


Start Your Own Video Sharing Site

Free Web Hosting | Free Forum Hosting | FlashWebHost.com | Image Hosting | Photo Gallery | FreeMarriage.com

Powered by PhpBBweb.com, setup your forum now!
For Support, visit Forums.BizHat.com