4
$\begingroup$

How can I invert / change the direction of the edges of an object so the outer pointing edges are pointing in and the inner pointing edges are pointing out.

Example below: The red arrows are pointing in the direction the altered edges should be pointing towards.

I tried multiplying the normal's by -1 but that didn't work.

img1

Answers to @christopher-bennett qestions

  1. The Koch fractal was created using Wannes Malfait free L-systems fractal add on. https://github.com/WannesMalfait/Blender-Add-ons/blob/master/L-System.py

Video of it in action

  1. It's a mesh

Answers to @markus-von-broady Thanks to Markus I figured a way to show / animate (a smaller section) the process although not in Geometry nodes. (Instead of trying to do everything all at once separate each process out.)

How the invert would work.

1st part Inner going to outer

inner

2nd Outer going to inner

outer

Please note that this was just an example fractal I was looking for a general way to do this not just for one specific fractal since I would like to do the operation on other fractals.

Settings I used:

img2

Attached blend file below:

$\endgroup$
5
  • 1
    $\begingroup$ Sorry, it might help to know a bit more about how you made the fractal (Koch Snowflake) in the first place. Is it a curve or a mesh? Is it from a math function or an addon (or possibly an .svg)? $\endgroup$ Commented Feb 21, 2023 at 16:57
  • $\begingroup$ @ChristopherBennett Ok I updated the question to answer your questions and attached the file with the link to the add-on $\endgroup$
    – Rick T
    Commented Feb 21, 2023 at 17:45
  • 1
    $\begingroup$ Yeah, thanks. I'm not sure I know the answer, but I upvoted the question to increase the chances that someone who does know comes along. $\endgroup$ Commented Feb 21, 2023 at 17:51
  • 1
    $\begingroup$ Those arrows don't tell us anything. Couldn't you just manually model the change you want to achieve procedurally? Also, as someone with 3520 rep, you surely know an edge is a line segment, so reversing it just leaves you with the same thing you started with, unless you want to flip the edge's vertices (in which case it would be more clear to phrase it this way; but clearly neither is what you actually mean). As far as I understand your problem, there simply is no general way other than some AI that on a case by case basis figures out what an "edge" means in a given context. $\endgroup$ Commented Feb 22, 2023 at 0:21
  • $\begingroup$ @MarkusvonBroady I took your advice animated it manually and (posted it to the question) and realized you may be correct, there maybe no way to generalize it since it would require changing the pivot point multiple times which would depend on the fractals various edge angles. When you posted the animation it showed me this. Thanks! $\endgroup$
    – Rick T
    Commented Feb 22, 2023 at 8:41

3 Answers 3

2
$\begingroup$

To answer the specific example of the Koch Snowflake, you can build this fractal by designing a transformation which divides each edge into 4 segments, resizes first and last segment from ¼ to ⅓, and moves the center point along the normal so segments created by it have equal length to the former two.

Now initialize the used i attribute holding the number of the iteration (you could do without it by basing offsets on edge lengths, but why complicate things), and duplicate the node group a few times:

Now setting the scale of the 'extrusion' to negative will allow you to flip the side of this transformation:

You can also control which or from which iteration to flip:

$\endgroup$
2
$\begingroup$

Cunningham's Law…

You probably either want the distance to be calculated to a local origin (1) instead of the current average position (2), or you want more then just 1 vert/edge to flip (the entire half-star).

$\endgroup$
0
$\begingroup$

Another way to do this that will work on some fractals is to use a fractal that uses the same local origin for the points that will move.

Split the points up into outer going vertices and inner going vertices and "manually" (odd / even on this one) choose the points you want to adjust.

As stated by Markus there really is no general way to do this.

ani1

img1

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .