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

Next
 From:  bemfarmer
5177.1 
Here is a quick script which places points on a sphere, by means of a golden section spiral.

The points are approximately evenly distributed.

Python source here: http://www.softimageblog.com/archives/115

Ran CopyToPoints with a small sphere.

Edit: June 13, 2012. Attached is an upgrade to SpherePoints, which also creates radial lines, which enable
ArrayGem to work, in order to do a spherical array, normal to the sphere.

EDITED: 19 Feb 2014 by BEMFARMER


Image Attachments:
Size: 168.4 KB, Downloaded: 45 times, Dimensions: 611x454px
  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:  futagoza (STEFAN)
5177.2 
Wow,

thank you very much, much appreciated!

Best regards
Stefan
  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.3 In reply to 5177.1 
Done with SpherePoints version 2. See second post up.
For a solid sphere, I was unable to get an internal pointing array, with ArrayGem. Can get it with Orient.

With a circle revolved 180 degrees, forming a half sphere, and rotating a copy to make a full sphere,
ArrayGem created inward facing cones.

EDITED: 13 Jun 2012 by BEMFARMER

Image Attachments:
Size: 321.7 KB, Downloaded: 26 times, Dimensions: 756x621px
Size: 152.1 KB, Downloaded: 16 times, Dimensions: 736x721px
  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.4 In reply to 5177.3 
For 10, 20, 100, 200, and 50 antipodal points, ran ConnectPoints script on the points.
Depending upont the tolerance, from 0.4 to 1.5, produced a convex hull of edges, +/-, with sometimes some
extra inner lines. The more points, the lower the tolerance should be...

Sometimes planar does one face. Need an edgewalker script. :-)



  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:  futagoza (STEFAN)
5177.5 In reply to 5177.4 
Hi Ben,

you could try also the following to get faces quickly. Simply save the point file with an .asc extension and then load it into Meshlab and in the "Remeshing, etc." menu apply ball pivoting surface reconstruction. Then save as .obj and use Michael's new Obj23dmWireframe converter with the new option and voila you can create quickly a surface for your sphere/dome or make a solid out of it.

Regards
Stefan

EDITED: 29 Jun 2012 by STEFAN

  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.6 
You have some volumes in the free Wings3D too who maybe help you! ;)
http://www.wings3d.com/
---
Pilou
Is beautiful that please without concept!
My Gallery
  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.7 In reply to 5177.5 
Thank you Stefan, for the meshlab instructions.
I'll try it out. Did read about .asc and meshlab recently, and how to enable renaming extensions in
Windows 7.
  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.8 In reply to 5177.6 
Thank you 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.9 
SpherePoints+
This is enhanced version of the one of my favorite scripts.

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

Image Attachments:
Size: 237.1 KB, Downloaded: 61 times, Dimensions: 1077x1077px
Size: 376.3 KB, Downloaded: 67 times, Dimensions: 1000x1000px
  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: 24 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.
Attachments:

  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 :)
Attachments:

Image Attachments:
Size: 151.1 KB, Downloaded: 66 times, Dimensions: 1351x1104px
  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-20  21-25