Jump to content
DomC

voronoi familiar colorful cubes

Recommended Posts

This Marionette network uses a custom node, which implemented the pixel-based try and error code (I think there is no other way to create voronoi, is it?) from here https://en.wikipedia.org/wiki/Rosetta_Code

Instead of Pixels it uses rectangles which were extruded in random height (ground height is different in every voronoi cell). And different full spectrum random colours (which would look much better with adapted colour design).

Carefull playing around with values. Do not enter to high or to low values. Creating 843'135'013 extrudes, could take a while :-)

colorfulCubesInVoronoiLook.png

VoronoiTest.vwx

Edited by MarissaF
Update Links

Share this post


Link to post

The great thing about Marionette is that it allows us to use any of the existing Python libraries.....and there are alot of them. Scipy and Numpy for example, are huge libraries with lots of good stuff and can be installed using these instructions. The idea is that for VW and Marionette to have access to them they need to be installed in the "Python33\Lib\site-packages" folder of the VW application. Also attached is an example of using these libraries (a couple of functions from them wrapped in a node) to generate a random Voronoi pattern as a plugin object. I'm hoping to provide a stand alone installer for some of these libraries in the near future, it's a little tricky curently. Let me know if you have problems.

VoronoiObj.vwx

Voronoi_Wall.png

Share this post


Link to post
I'm hoping to provide a stand alone installer for some of these libraries in the near future, it's a little tricky currently. Let me know if you have problems.

Mark: I'm having some difficulties with the Python install instructions you provided for Mac OS X. I am no 'Terminal' wizard, and unfortunately the instructions have not been dumbed down enough for my very limited UNIX skill set.

If I follow the instructions on Install Python, NumPy, SciPy, and matplotlib on Mac OS X then it installs the incorrect version of Python (2.7), but if I follow your instructions, I can't get 'pip' to install properly.

Should the .bash_profile contain both of these lines?

export PATH=/usr/local/bin:/usr/local/share/python:$PATH
export PATH=/Library/Frameworks/Python.framework/Versions/3.3/bin:$PATH

The first line is from the penandpants.com instructions, the second is from your instructions.

Thanks in advance.

Share this post


Link to post

You dont need to install Python, it's already in the VW package. I know another user who sucessfully got this setup on the mac yesterday. I just sent him an email asking if he can give a tips here. We'll get it...as a community.

Share this post


Link to post

Mark - thanks for the reply.

That would be great - I was just attempting to follow the steps in the .txt file you posted regarding installing Scipy and Numpy on Mac OS X. Perhaps I misread your post and thought you would need to install these two Python modules if you wanted to work with the Voronoi Marionette example.

It may have been unnecessary research, but I found what seems to be a good resource on initial setup for Python on Mac OS X: Hackercodex.com :: Configuring Mac OS X on Yosemite & Mavericks

Share this post


Link to post

You are correct in that you need to install Numpy and Scipy in order to run my example that uses these libraries. You do not need to install Python, that is alraedy on your machine.

Share this post


Link to post

Great - thanks for the clarification Mark. It was installing pip3.3 where I ran into difficulty with the VW package-installed Python version.

Does the Python version have to be 3.3.2 for Vectorworks? I noticed on the Python 3.3.2 release page that a newer security-fix release 3.3.6 is available. (They recommended using 3.3.6).

Share this post


Link to post

Hi Tim

To install Numpy and Scipy on a Mac, use the description you got with these files. Make sure to install them where you can find them later because you'll need to move them to another folder.

Once they are installed just go to your Vectorworks.app and right-click it to enter the contents of the app ('show package contents'). Browse to Contents:Frameworks:Python.framework:Versions:3.3:lib:python3.3:site-packages and drop the folders "numpy", "numpy-1.9.3.dist-info", "scipy" and "scipy-0.16.0.dist-info" in there.

Now restart your Vectorworks and enjoy.

Have fun.

Edited by FunkyBass

Share this post


Link to post

@FunkyBass - thanks for the instructions, I'll give it a shot.

So can I assume that if there are any other Python packages that we want to install and use in Marionette, one would follow similar steps by manually copying them into the Vectorworks.app package?

Thanks again for your help!

Share this post


Link to post

Hi Tim

I think this shoud be possible. But maybe not every function can be used simply inside the Vectorworks "container". Particularly functions which wants to open a dialog window, print something in the terminal Window and other user interaction.

The instruction from Mark and FunkyBass for Numpy-Installation works fine here. I Installed it in a separate folder. And then copy/pasted it in the Vectorworks Application Content.

I would not overplay with actions like this ...

Share this post


Link to post
I would not overplay with actions like this ...

@DomC: I agree completely. Copying and pasting folders inside of application packages makes me very nervous.

@Vectorworks: This does not seem like the safest system for users to install additional Python packages. Would it be possbile for Vectorworks to have a symbolic link inside the Vectorworks application package which soft linked to the user's Python installation folder which is outside of Vectorworks?

Share this post


Link to post

We actually added a path exactly for this reason on the mac. It should be available in SP2. It is just outside the package at

"../Libraries/PythonExternals". Python modules will be available to VW and Marionette from this location.

Also, In response to DomC above...I have seen Marionette launch dialogs and plot data from SciPy. It is possible.

Take a look at the enormous functionality of these libraries. http://docs.scipy.org/doc/scipy/reference/

All sorts of good stuff there. VW + Marionette + Signal Processing? ;-)

Share this post


Link to post

Mark - Thanks for adding the external path to Python, that seems like a much safer, long-term solution.

Share this post


Link to post
Take a look at the enormous functionality of these libraries. http://docs.scipy.org/doc/scipy/reference/

All sorts of good stuff there. VW + Marionette + Signal Processing? ;-)

Mark - would it be possible with added Python libraries to create a Marionette node that functions similarly to Grasshopper's 'Image Sampler' node?

Something that could create 2D surface patterns by sampling a reference image:

designcoding :: Facade Study – Bitmap Pattern

designcoding :: Image Sampler Revisited

Thanks.

Share this post


Link to post

I believe so. Scipy has an image processing library. Once we can work with the individual components of the image (colors, pixels, etc) alot should be possible. We could draw and extrude a grid of circles whose radius was determined by the average brightness of the pixels, for example.

Share this post


Link to post

Mark - thanks for your reply. Are you saying that just installing scipy will allow us to work with individual components of an image, or is there some core functionality that needs to be added to Vectorworks for this to work (like UV mapping)? Thanks.

Share this post


Link to post

I can not find the two whl filg on the web

numpy-1.9.2+mkl-cp33-none-win_amd64.whl

scipy-0.16.0rc1-cp33-none-win_amd64.whl

if hvae,please send me

lin

Share this post


Link to post

Hi @DomCand @Mark Flamer, wanting to implement a voronoi pattern in vectorworks, the file that was attached to this thread from the old forum has disappeared. Any chance of re-uploading please. (adding @MarissaFand @Alan Woodwellif maybe either of you had downloaded it and have a copy?)

@JimWis this common with all previous attachments at the old forum? Will they be migrated forward at sometime?

Thanks

Edited by twk

Share this post


Link to post
3 hours ago, twk said:

@JimWis this common with all previous attachments at the old forum? Will they be migrated forward at sometime?

See this thread:

 

Edited by rDesign
  • Like 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×