Grasshopper

algorithmic modeling for Rhino

Hi there,

does anybody know of a way to generate the zebra stripes pattern in grasshopper that is available in Rhino (Analyze - Surface - Zebra)?

I searched RhinoCommon, but that didn not help me very much. I found "VisualAnalysisMode Class", but I could not figure out how to use it...

What I would like to do is:

- I have a brep in grasshopper (with multiple faces)
- I would like to display this with zerbra stripes as Rhino does it to visualize the surface curvature

Any ideas?

Best regards
  Stefan

Views: 9502

Replies to This Discussion

The zebra stripes depend on camera position as well as shape. I do not know how to mimic it though.

Would using a regular reflection  environment map be enough for your purposes?

--

David Rutten

david@mcneel.com

Tirol, Austria

I tried this in Rhino (Analyse - Surface - Environmet Map) using an image with regular stripes and that looks promising.

I'll be grateful for hints how to realise this in grasshopper!

Thanks in advance
  Stefan

I attached a rather nasty VB-component hack. It works, but probably isn't very fast.

--

David Rutten

david@mcneel.com

Tirol, Austria

Attachments:

Excellent! That's it.

Thanks a lot.

Best regards
  Stefan

So based on the "environment map" idea.....how could one achieve this with projected curves? Is there any sort of "reflection" or environment project teachniques to map curves onto the surface using the same logic? Thanks!

Millipede has a component to draw lines on mesh.The input param is a numeric value for every vertex of the mesh. You can Convert the zebra meterial  to a Domain and  iso value for the mesh.

How would you convert a reflected UV coordinate into a mesh vertex though?

--

David Rutten

david@mcneel.com

Tirol, Austria

for example if the whole map represents domain 0 to 100 and 0-20 40-60 80-100 represent black. Of course 20-40 60-80 is white. then the iso values are {0 ,20 ,40 ,60 ,80,100} .

Each MeshVertex get a data related to the viewsite and then map these data to 0-100.The data can be distance, the vector angle between the priciple curvature and view or something else.

My point was that the reflection map does all sorts of nasty things (topologically) to the environment map. Although the Zebra map is just black and white stripes, in the reflection we find little isolated islands of black within white and vice versa.

I suppose you could try and tackle this on a per-triangle basis, but it still sounds pretty tricky.

--

David Rutten

david@mcneel.com

Tirol, Austria

Based on reflection map, how to make the pattern as a regular texture? Thanks!

This is a script which puts colours on a mesh instead of a texture. It doesn't handle parallel views too well at the moment, but that should be an easy fix.

--

David Rutten

david@mcneel.com

Tirol, Austria

Attachments:

Thank you so much! Just wonder is it possible to make the edge of the stripes smoother?

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service