Grasshopper

algorithmic modeling for Rhino

Hi, I am trying to add a fisheye lens/ barrel effect to a flat image, I already found a code for that in Matlab, guess it should be difficult to transfer into VB or C but I am not very familiar with this transformation.

This is the link for the Matlab conversion...

http://stackoverflow.com/questions/2589851/how-can-i-implement-this...

Your help is appreciated, thanks in advance :)

Views: 3232

Replies to This Discussion

Hi Dalia,

Grasshopper doesn't have any bitmap manipulation tools by itself. I think there are some plugins that do that (firefly?). You're going to have to write this from scratch if you want to do it in VB/C#.

I see two reasonable ways forward:

  1. Use a graphics program such as Photoshop, Illustrator or Paint.NET. They typically have fish-eye lens distortion available as a standard feature.
  2. Create a Rhino surface, apply the image as a texture and then fiddle with the control-points to achieve a deformation.

--

David Rutten

david@mcneel.com

Bitmaps are not natively supported data types in GH. You can certainly store a bitmap into a generic goo instance or you can even create an entirely new goo type specifically for bitmaps.

--

David Rutten

david@mcneel.com

Do you have any example for this code? I am not somewhat new to coding... Thanks!

The Grasshopper SDK documentation has examples for writing custom data types and parameters. You can download this file via the Help menu.

--

David Rutten

david@mcneel.com

Thanks for the responses, since my coding background is limited to some VB.net knowledge it will eventually take me time to figure this out...

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service