Attractor on Grasshopper (Vasarely like)

thanks Michael, I cannot find a component which has as input: LPRSA
and out put: P, where is that component? does it come within a plugin?
CHeers
Marcel

The component is called Pinch’n’Spread and is part of Michael Pryors plugin Pufferfish, you can find it on food4rhino

1 Like

Links are in comment you replied to.

I found and fixed two subtle bugs in my parametric surface generator, though neither of them substantially affect the problems seen with UV mapping:

  1. Using Bounds and ReMap before the Graph Mapper was clipping off the full range of values I expected. Solution: delete them.
  2. While I was happy with the radial displacement of points in X and Y (top view), the surface appeared more flat topped than expected (front view). The mistake was using Z values from the points’ original XY location instead of their displaced positions, further from the center, further down the sine curve slope.

The solution to #2 was to do the radial displacement first, then get new Distance values to apply to Z. I created a ‘dropOff’ cluster to handle the details and used it twice, first for XY and then for Z. Here is the source for the cluster:


And a simple demo of what it does, “easing” the linear values using Graph Mapper (Graph type = Bezier as shown, though reverted to Sine later):

dropOff_2019Jul14a.gh (15.4 KB)

Used twice:


Vasarely_srf_2019Jul14a.gh (38.5 KB)
As before, there is extraneous code at the bottom comparing three methods of using the displaced points to generate the compound surface. Based on visual inspection, SrfGrid appears to be the best choice.

There is also a white group labeled “alt UV” that uses the interpolated curves to split the surface the way I want it instead of the nonsense coming from actual UV mapping.

To integrate this with @jasongberger’s model I first modified his code in two ways:

  1. Used Map Srf instead of Sporph because they do the same thing in this case and Map Srf is better suited to my (deluded) plan…
  2. Instead of culling the edge points, I used the centroids of squares for the circles.


Vasarelydesign_R5_2019Jul14a.gh (14.2 KB)

Result? Failure! Map Srf ignores the trimmed fragments from SrfSplit that I’m trying to use as the ‘T’ (Targets) input. I knew that… but forgot. :frowning:

P.S. One more anomalous detail. SrfSplit yields the same results regardless of whether or not the white curves are pulled to the blue surface!? How bizarre.


2 Likes

I made this based on JB’s original GH script - thanks for showing how to do it. But I can only get it to work by using the original surface JB created. I tried all the different methods Joseph Oster describes to make the base suface, and even went so far as to construct one from a rectangle and a hemisphere. But none of them worked properly with the Sporph & SrfSplit functions. So it seems there is something unusual about the original surface.

2 Likes

I don’t know how that could be, I made it simply, just how I described it in the earlier post to @Joseph_Oster. If I have time I’ll try messing around with some other shapes, see if I can figure out what’s going on.

Nice pic btw, I see you preferred not to use the project component.

In the meantime, enjoy this little animation I put together yesterday:

1 Like

Aloha @Birk_Binnard. I have to admit that I started down that path too, before @jasongberger posted his solution that took me in a different direction, into the weeds. I am able to create similar surfaces in Rhino using Jason’s manual method but am not interested in that non-parametric approach, though I tried many GH ways to duplicate it that I haven’t mentioned here.

Does this look familiar?



Vasarely_srf_2019Jul14b.gh (43.5 KB)

It’s a mashup of that model you and I played with two years ago (mentioned earlier) and my current parametric surface generator. Something to note is that we were using SrfMorph (standard GH?) instead of Sporph (Jackalope plugin).

Cheers.

P.S. Links to specific posts on the old forum don’t work anymore? :frowning: This was from my second to last post in that thread, on page 3, November 14, 2017 at 8:24am:
SrfMorph_2017Nov14a.gh, 23 KB

1 Like

I think I may have figured out something about the troubles I with surfaces made with Loft, Sweep, and Revolutions. When I made my array of circles (or stars as I showed above) and mapped them onto my surface with Sporph or SrfMorph what happened was that the projections at the top of the hump got smaller instead of bigger. This makes me think that the projection code is using some sort of isometric algorithm instead of whatever method is used with the original Rhino surface.
Here’s an exammple of this effect using a Loft surface with MapSrf instead of Sporph:


(Yes I know I haven’t got the spacing etc. tweaked properly.)
And here is the same thing with the original Rhino surface:

Is this weird or what?

Or maybe it has to do with dividing the surface up with domains. Or something like that. Of course I could be totally wrong about all this since it is just a wild guess based on the results I saw.

JB: Actually I did include the 2D projection part in my GH layout. But I prefer the top view of the 3D geometry because it has shading that I think improves the perception of a 3D surface. Plus I have always been a 3D person ever since my first job in the aerospace industry.

Joseph: we share the belief that parametric is the only way to go (Parametric Modeling) and yes, I do remember (now) that old set of postings. It helped me make a number of 3D printed objects with stick-ons or holes on their outsides. I should probably go back and look at those old GF files to see if there is some trick I used then that I have since forgotten. Thanks for pointing that out.

Looks like your first image is a surface of revolution? It’s all about the UV mapping, which depends in large part on how a surface is created. I don’t understand it well enough to explain it or “fix” the skewed UV layout in my own model.

This is the same code as before, UV “warts and all”, but replacing the hemisphere “stick-on” with a more complex two-part geometry (light blue group). Two copies of SrfMorph are used so that the rings (copper) and gems (emerald) can be baked to separate layers and assigned different materials. Rendering uses Neon in R5.



Vasarely_srf_2019Jul14c.gh (48.2 KB)

1 Like

That UV stuff has always seemed like a bit of black magic to me. Clearly there’s something mysterious going on there. Maybe someone here can explain whatever it is.

1 Like

This is a weird little gadget that doesn’t explain anything but shows the intersecting U and V curves for any given point on a surface. As written, it works on only one surface at a time, so I replicated it in a cluster (UVcrvs) and wired up three sample surfaces:

  • a revolved BiArc surface (round, on the left)
  • my SrfGrid (highlighted in green, in the middle)
  • Jason’s Rhino surface on the right


UVcrvs_2019Jul14a.gh (26.9 KB)

Cluster UVcrvs source:
UVcrvs_2019Jul14a2

Surfaces created with two curved edges (below); note that ‘U = 0’ is different on these two because of how they were created:

UVcrvs_2019Jul14a3

That’s a very interesting demo - thanks for putting it together. But…I don’t understand why it works, or how it works, or why it works the way it does. Clearly it is showing us something - I just wish I knew what that was.

PS (different topic): I could never figure out how to get CustomPreview to work with color swatches. Do you know of a tutorial that explains this? Thanks.

Here we have a similar way of what @jasongberger was doing with his referenced surface using Point Deform.


VasarelyLikeAttractorGridDeform_reV2.gh (15.8 KB)

3 Likes

I knew there was a standard component for what my UVcrvs cluster was doing but couldn’t remember what it was: Iso Curve.


UVcrvs_2019Jul15a.gh (23.5 KB)

I don’t understand this question?

Thanks @HS_Kim, this is the piece I was missing - and still am unless I install LunchBox:

missing

HS Kim: your method of creating the array of circles and the PlaneSrf is far better than mine - thanks (again) for showing how things should really be done.

It is not clear to me what RebuildSrf does. It seems to have something to do with how the surface is “stretched” as it’s shape is determined. In other words, I think it has some relationship with the ISO curves that are used to define the surface shape.

What I’d like to do is is use a surface like this:

This is a simple Revolution surface made from an Interpolated curve defined by 5 XZ points. But when I replace Jason’s surface with mine I get this:

I have Lunchbox installed (only for the Platonic solids) and I’ve tried using Rebuild on the above surface, but it doesn’t change anything. Obviously I am not understanding whats going on with the MapSrf component. My sense it whatever it is is related to the UV Isocurves.

Could it be that the Isocurves on the surface have to match the Isocurves on the array of circles (actually I’m currently using ellipses) and/or the PlaneSrf that feeds the S input on MapSrf? Maybe that’s what RebuildSrf really does - it regnerates Isocurves based on the U & V values you give it.

Joseph: I meant I can’t seem to get separate GH objects displayed in different colors on my Rhino screen. I often make objects with multiple parts that get joined together for 3D printing. I’d like to be able to display in Rhino the different parts with different colors. But for some reason I’m not using the proper method to do this - all I can get is the single color that GH is set to.

To see custom previews, it is frequently necessary to disable preview on components preceding the one you want to color.

Interesting - thanks. I’ll try it.

“Frequently” sounds like a bug to me.

Because surface fromPlane Surface is degree 1 surface. By using Rebuild Surface,I changed it to degree 3 suface and gave more control points for smooth defomation.
What I’ve done withRebuild Surface can be explained by using “rebuild curve” like the attached screenshot.
As you can see, by moving only 2 (as per surface =4) CP, It won’t affect the 2 CP on edge side.

That’s because mine has a rectangular grid like UV space topology whereas yours has a Radial UV space topology. They are different.
If you want rectangular UV space, then you probably would try to make a rectangular patch with a similar curvature of yours and trimming the boundary portion with a circle. Using the “Drape” command in rhino, you can make it easily IMO…

That is very helpful. Thanks for the explanation.

GH has nothing like the Rhino Drape command. So the problem reduces to how to convert a GH surface from Radial UV space to Rectangular UV space. I wonder if there is a Rhino function that does this.
Or is it possible to invoke the Rhino Drape command from GH via some code?