Request: Random selection
All  1  2-6

Previous
Next
 From:  Michael Gibson
3927.2 In reply to 3927.1 
Hi Pilou, here's a script that can do the random selection part:

script: /* Deselect random objects */ var percent = 30; var objs = moi.geometryDatabase.getSelectedObjects(); for ( var i = 0; i < objs.length; ++i ) { if ( Math.random() * 100> percent ) objs.item(i).selected = false; }

You can change the value for the percent = 30 part in the script to adjust keeping more or fewer objects selected when it is triggered.

It won't give you exactly 30% of objects to remain selected, because it goes just object by object and gives each object by itself a 30% chance of remaining selected. But it should give a result somewhere close to 30% of the objects remaining selected.

- 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:  Frenchy Pilou (PILOU)
3927.3 In reply to 3927.2 
Works like a charm!
You can apply a fonction, reselect the random selection and re apply a random selection etc ;)
so you can obtain a chaotic result ;)

Many THX :)


And works fine for any types, curves, surfaces etc... ;)

EDITED: 22 Dec 2010 by PILOU

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:  DannyT (DANTAS)
3927.4 In reply to 3927.3 
Interesting stuff there Pilou, you might also be interested in this http://structuresynth.sourceforge.net/index.php

Cheers
~Danny~
  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)
3927.5 In reply to 3927.4 
yes but need some little effort of little scripting ;)
---
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
 From:  Frenchy Pilou (PILOU)
3927.6 
---
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
 

Reply to All Reply to All

 

 
 
Show messages: All  1  2-6