SpherePoints Script, evenly (more or less) distributed points on a sphere, by Golden Section Spiral
 1-8  9-25

Previous
Next
 From:  Max Smirnov (SMIRNOV)
5177.9 
SpherePoints+
This is enhanced version of the one of my favorite scripts.

[Added] Significant performance improvements (>30000 points per second)
[Added] Radius tuning

EDITED: 7 Mar 2022 by SMIRNOV

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
5177.10 In reply to 5177.9 
Max, you have made great improvements!

I've got to study this, in order to try to adapt some other scripts to this faster method.

How did you learn to program so well? Xgood?

- Brian

EDITED: 25 Jan 2014 by BEMFARMER

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Max Smirnov (SMIRNOV)
5177.11 In reply to 5177.10 
Thank you, Brian.

>> I've got to study this, in order to try to adapt some other scripts to this faster method.
It's easy. You need to move all geometry active functions to .htm (especially functions with loops). It's no need to move all functions. But you must be careful when you place heavy functions in htm. If you run such a function, it causes MoI to hang until calculations is finished. So I prefer to send data to function part by part. In addition I use progress bar.
Like this:


Also in SpherePoints script I changed a method that creates points and lines. I don't like a huge pile of factories, so now this script generates objectlist directly, using only one factory.

>> How did you learn to program so good?
:)) Programming is my hobby for the last 25 years (but it's not my only hobby :). I'm not a professional programmer or 3D designer.

EDITED: 7 Mar 2022 by SMIRNOV

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
5177.12 In reply to 5177.11 
Thanks Max.
Where does the progress bar come from?

- Brian
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
5177.13 
;)




PS How do you use the result of the radial lines for have your sphere of colored cones ? - not the colors but for place the cones ? Post 5177
You said Array Gem but how ? Lines are not curves and there is no surface...so ...I must miss something :)

EDITED: 25 Jan 2014 by PILOU

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
5177.14 In reply to 5177.13 
Create -SpherePoints and lines.
Create a cone and base circle.
Create a sphere.
Do ArrayGem, select cone and base circle.
Select lines, (do not re-select base circle). (Helps to color select the lines, or temporarily hide the sphere.)
Select sphere.
Done

- Brian

Was able to do 100,000 points, and lines, with Max's _SpherePoints. It only took a few seconds. Haven't tried a million yet.:-)
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
5177.15 
Calculate is long but Perfect!
Cones are inversed! :)
So maybe Flip lines before ?

EDITED: 26 Jan 2014 by PILOU

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Max Smirnov (SMIRNOV)
5177.16 
Brian
>Where does the progress bar come from?
This is my new script for exporting instances data from MoI to Octane Render.

Frenchy Pilou
>Calculate is long but Perfect!
1000 cones ~3-4 seconds

>Cones are inversed! :) So maybe Flip lines before ?
No. Everything is correct.
Maybe you're doing it wrong?

EDITED: 8 Feb 2014 by SMIRNOV

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
5177.17 In reply to 5177.16 
Cool video : i will exam that i make different! First view nothing :)

Second view...there is something but what? :)

Maybe a bug inside ArrayGem ? Or I Input a false espacement or...Unity...or...

What did you made at 0.012 ? Lines becomes points dashed



http://moiscript.weebly.com/uploads/3/9/3/8/3938813/conesbug01.3dm

EDITED: 26 Jan 2014 by PILOU

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
5177.18 
For a while today, I could not get ArrayGem to work. Maybe something to do with the ArrayGem spacing.
Then after practicing with a curve on a cylinder, with spacing, ArrayGem worked again.
So then with SpherePoints, I learned that doing Flip on the base circle, caused the radial direction of the cones to reverse,
with respect to the sphere.
So maybe ArrayGem spacing matters? And radial length of the lines?
Also the normal of the base circle matters.

- Brian

Flip of the radial lines puts the focus on the center of the sphere.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
5177.19 In reply to 5177.18 
Hi Pilou, yeah I guess you have somehow created your base circle for ArrayGem in some way such that its default plane normal is going downwards instead of upwards.

So select it and go to a side view of the circle and use the rotation grip on the edit frame to rotate it by 180 degrees, that should then get it oriented how you need it in relation to the base object.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Max Smirnov (SMIRNOV)
5177.20 In reply to 5177.17 
I checked your file. Аll the same. I think that the easiest solution - turn the base circle.


>>What did you made at 0.012 ? Lines becomes points dashed
:)
code:
script:/* wireframe v1.0 */ var gd = moi.geometryDatabase; var so=gd.getSelectedObjects(); if (so.length>0) { so.setProperty( 'displayMode',1); so.setProperty( 'selected', 0); } else { gd.getObjects().setProperty( 'displayMode',0); }

This is another my script. I use it very often.
It switches selected objects to wireframe mode. If no objects is selected - it switches all hidden objects back.

P.S. I think I should make a website to share ALL my scripts with community :)

EDITED: 7 Mar 2022 by SMIRNOV

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
5177.21 
Ok ! That was the orientation of the base for an half parts for mysterious reason! :=)




<<< P.S. I think I should make a website to share ALL my scripts with community :)

Sure! That will very cool !

And your video shows that your computer is maybe 500 faster that mine for th cones! :)

EDITED: 26 Jan 2014 by PILOU

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
5177.22 
You have also on your video a List Menu with some Plugins clickable!
How do you make this list ?

Have you a plugin for make this list ?
Or Maybe Michael has some views on this for next releases ?

EDITED: 27 Jan 2014 by PILOU

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Max Smirnov (SMIRNOV)
5177.23 In reply to 5177.22 
>>Have you a plugin for make this list ?
Yes, this addon generates external scripts list on the fly. It's a part of my CustomUI system.
This system consist of loader script and addons, which you can enable and disable as you want.
I'll release it this week (right after MoI Scatter tools ;)
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
5177.24 In reply to 5177.23 

EDITED: 27 Jan 2014 by PILOU

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  bemfarmer
5177.25 In reply to 5177.23 
Thank you Max :-)
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
 
Show messages:  1-8  9-25