Recent

Author Topic: Inversive Geometry Curves: How can one make these Graphic Effects in Lazarus?  (Read 1213 times)

Boleeman

  • Hero Member
  • *****
  • Posts: 765
While looking at how to make snowflake curves I came across a Mathematica site that talked about inversions of a Sierpinski Triangle. Just love the geometry in those generated Inversion Curves.
(Here is that site: http://web.archive.org/web/20131211045648/http://www.oftenpaper.net/sierpinski.htm   )

The site had some interesting Inversions of Sierpinski Triangle Curves (attached below). The site explained that:

The edges of the triangle were being mapped to curves, and that if you continued those curves they would form circles that intersected the origin (as shown by the 2nd attached png)

In Paint.Net there is a Polar Inversion filter that also makes interesting curve patterns (as shown in the 4th attached png).
This might be a nice filter to have in LazPaint.

Wondered if anyone has any idea of how to apply these Inversion Effects to loaded (png) curves using Lazarus?

I guess what I am asking is: How do you make a Curve Inversion in Lazarus ?

I realize that this topic might be too complicated, but hey "I thought I'd ask anyway"
« Last Edit: December 05, 2024, 08:51:44 am by Boleeman »

Boleeman

  • Hero Member
  • *****
  • Posts: 765
Found a bit more information here:
https://mathematica.stackexchange.com/questions/148705/inverted-version-of-sierpinski-triangle

The site says:
The geometric transformation called inversion and is just mapping coordinate r in a polar coordinate system onto the coordinate 1/r (the other coordinate - angle - stays the same). One just needs to define the center of such polar coordinate system, and its unit circle.

Gives me more of a clue now. Look at Polar Coordinate Mapping.

Attached is a coloured version.





Dzandaa

  • Sr. Member
  • ****
  • Posts: 404
  • From C# to Lazarus
Hi,

@Boleeman:

If you like mathematics, this is for you:

https://scholarworks.calstate.edu/downloads/dj52w6418

B->
Regards,
Dzandaa

Boleeman

  • Hero Member
  • *****
  • Posts: 765
As always Dzandaa, thanks for the reply.

When searching for Inverse Curves I kept on getting links to Mathematica.
Mathematica/Wolfram sites seems to have some good examples of mathematics and graphics. I was going to use it as a starting point, until I find some other sources. Possibly I will play around with the Academic (teacher's) version of Mathematica to see how it all works.

Found some javaScript code, which I will also look at.
Also Paint.Net plugins are written in CSharp, so perhaps I might be lucky and see some related code for polar inversion curves.

I suppose that as a starting point, I could make a Lazarus program that makes a simple Sierpinski Triangle in the center of a TPaintbox canvas. Then perhaps store the coordinates of the points in an array/collection, convert the points from Cartesian to polar and then apply the transform 1/r to  the points, leaving the angle the same  (polar coordinates are in the for (r, theta) ).

Not really that sure of what I'm doing so got to play around.
« Last Edit: December 06, 2024, 08:08:18 am by Boleeman »

Thaddy

  • Hero Member
  • *****
  • Posts: 16343
  • Censorship about opinions does not belong here.
Would you know if the teacher's version from Mathematica differs from the Raspberry Pi version?
There is nothing wrong with being blunt. At a minimum it is also honest.

Boleeman

  • Hero Member
  • *****
  • Posts: 765
Thaddy, I had it installed on my teacher laptop a number of years ago and backed it up somewhere to a hard drive. ... From what I remember it was quite small in size.  Still searching for it.

 

TinyPortal © 2005-2018