Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

May Euell Gibbons eat your only copy of the manual!


tech / sci.math / Sierpinski triangle transformation

SubjectAuthor
* Sierpinski triangle transformationsobriquet
`* Re: Sierpinski triangle transformationChris M. Thomasson
 `* Re: Sierpinski triangle transformationsobriquet
  `* Re: Sierpinski triangle transformationsobriquet
   `- Re: Sierpinski triangle transformationChris M. Thomasson

1
Sierpinski triangle transformation

<8f958b4f-d43b-499f-9f27-86267ac3adf5n@googlegroups.com>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=89227&group=sci.math#89227

  copy link   Newsgroups: sci.math
X-Received: by 2002:a05:620a:4503:: with SMTP id t3mr13174726qkp.525.1643078242828;
Mon, 24 Jan 2022 18:37:22 -0800 (PST)
X-Received: by 2002:a25:dd46:: with SMTP id u67mr26634441ybg.729.1643078242607;
Mon, 24 Jan 2022 18:37:22 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: sci.math
Date: Mon, 24 Jan 2022 18:37:22 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=85.148.91.183; posting-account=Ft_AlwoAAACRFHaTvqHzRLGUJWp0fdpP
NNTP-Posting-Host: 85.148.91.183
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <8f958b4f-d43b-499f-9f27-86267ac3adf5n@googlegroups.com>
Subject: Sierpinski triangle transformation
From: dohduh...@yahoo.com (sobriquet)
Injection-Date: Tue, 25 Jan 2022 02:37:22 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 3
 by: sobriquet - Tue, 25 Jan 2022 02:37 UTC

https://i.imgur.com/aKrh4us.png

https://www.desmos.com/calculator/nypvgblehm

Re: Sierpinski triangle transformation

<ssprit$bso$1@dont-email.me>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=89299&group=sci.math#89299

  copy link   Newsgroups: sci.math
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: chris.m....@gmail.com (Chris M. Thomasson)
Newsgroups: sci.math
Subject: Re: Sierpinski triangle transformation
Date: Tue, 25 Jan 2022 13:54:34 -0800
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <ssprit$bso$1@dont-email.me>
References: <8f958b4f-d43b-499f-9f27-86267ac3adf5n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 25 Jan 2022 21:54:38 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="b334073529dbd5e56db729a32efd5814";
logging-data="12184"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/K3L4B94aRMW2ztTPt7zLEp90FTZYBPaQ="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.5.0
Cancel-Lock: sha1:sI1iLF1nwspfO9odoJro0wpZSM8=
In-Reply-To: <8f958b4f-d43b-499f-9f27-86267ac3adf5n@googlegroups.com>
Content-Language: en-US
 by: Chris M. Thomasson - Tue, 25 Jan 2022 21:54 UTC

On 1/24/2022 6:37 PM, sobriquet wrote:
>
> https://i.imgur.com/aKrh4us.png
>
> https://www.desmos.com/calculator/nypvgblehm

Nice work! Elegant. Fwiw, when you get some really free time to kill,
check out this older formula I came up with that generates an
interesting escape time Sierpinski like fractal:

https://www.facebook.com/photo/?fbid=123930362099304&set=gm.799404557112051

The escape time formula:

z = (pow(z, 3.0) + (-((1.0 / 3.0) * 1.7))) / z

I am not exactly sure how to code it up in Desmos.

Re: Sierpinski triangle transformation

<28bd5d38-cd2e-4547-aeb8-2bdc6e306537n@googlegroups.com>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=89310&group=sci.math#89310

  copy link   Newsgroups: sci.math
X-Received: by 2002:ac8:58c1:: with SMTP id u1mr13584836qta.267.1643156007141;
Tue, 25 Jan 2022 16:13:27 -0800 (PST)
X-Received: by 2002:a25:6f43:: with SMTP id k64mr34119258ybc.206.1643156006991;
Tue, 25 Jan 2022 16:13:26 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: sci.math
Date: Tue, 25 Jan 2022 16:13:26 -0800 (PST)
In-Reply-To: <ssprit$bso$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=85.148.91.183; posting-account=Ft_AlwoAAACRFHaTvqHzRLGUJWp0fdpP
NNTP-Posting-Host: 85.148.91.183
References: <8f958b4f-d43b-499f-9f27-86267ac3adf5n@googlegroups.com> <ssprit$bso$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <28bd5d38-cd2e-4547-aeb8-2bdc6e306537n@googlegroups.com>
Subject: Re: Sierpinski triangle transformation
From: dohduh...@yahoo.com (sobriquet)
Injection-Date: Wed, 26 Jan 2022 00:13:27 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 40
 by: sobriquet - Wed, 26 Jan 2022 00:13 UTC

On Tuesday, January 25, 2022 at 10:54:47 PM UTC+1, Chris M. Thomasson wrote:
> On 1/24/2022 6:37 PM, sobriquet wrote:
> >
> > https://i.imgur.com/aKrh4us.png
> >
> > https://www.desmos.com/calculator/nypvgblehm
>
> Nice work! Elegant.

I like the way that you can figure out aspects in isolation, like how to transform
a triangle and then plug that principle into a different context like a fractal.

https://www.desmos.com/calculator/gxbwygf9yf

But at the moment, it's rather slow, since the parameter traces out the entire
outline of the fractal.
I think I might be able to speed it up if I use the mod function so it only has to compute
one part and then it can copy that in a 120 degree rotation a couple of times.

> Fwiw, when you get some really free time to kill,
> check out this older formula I came up with that generates an
> interesting escape time Sierpinski like fractal:
>
> https://www.facebook.com/photo/?fbid=123930362099304&set=gm.799404557112051
>
> The escape time formula:
>
> z = (pow(z, 3.0) + (-((1.0 / 3.0) * 1.7))) / z
>
> I am not exactly sure how to code it up in Desmos.

Desmos doesn't have complex numbers built-in. So you'd have to code the relevant
operations yourself.
Like multiplication of two complex numbers (a+bi) * (c+di) = ((ac-bd) + (ad+bc)i).

https://www.desmos.com/calculator/ce99zi4fzq

I'm also working a bit on the Koch curve, and I was thinking that perhaps it can be combined
with the Sierpinski triangle into a kind of hybrid of the two or perhaps morphing between them.

https://www.desmos.com/calculator/gfkaliyaf3

Re: Sierpinski triangle transformation

<f7fd721c-f75b-4f33-90cf-bfa3dd64cb3an@googlegroups.com>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=89314&group=sci.math#89314

  copy link   Newsgroups: sci.math
X-Received: by 2002:ad4:5968:: with SMTP id eq8mr3979908qvb.68.1643159302646;
Tue, 25 Jan 2022 17:08:22 -0800 (PST)
X-Received: by 2002:a25:234c:: with SMTP id j73mr34663546ybj.8.1643159302450;
Tue, 25 Jan 2022 17:08:22 -0800 (PST)
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!news-out.netnews.com!news.alt.net!fdc2.netnews.com!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: sci.math
Date: Tue, 25 Jan 2022 17:08:22 -0800 (PST)
In-Reply-To: <28bd5d38-cd2e-4547-aeb8-2bdc6e306537n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=85.148.91.183; posting-account=Ft_AlwoAAACRFHaTvqHzRLGUJWp0fdpP
NNTP-Posting-Host: 85.148.91.183
References: <8f958b4f-d43b-499f-9f27-86267ac3adf5n@googlegroups.com>
<ssprit$bso$1@dont-email.me> <28bd5d38-cd2e-4547-aeb8-2bdc6e306537n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f7fd721c-f75b-4f33-90cf-bfa3dd64cb3an@googlegroups.com>
Subject: Re: Sierpinski triangle transformation
From: dohduh...@yahoo.com (sobriquet)
Injection-Date: Wed, 26 Jan 2022 01:08:22 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 3216
 by: sobriquet - Wed, 26 Jan 2022 01:08 UTC

On Wednesday, January 26, 2022 at 1:13:31 AM UTC+1, sobriquet wrote:
> On Tuesday, January 25, 2022 at 10:54:47 PM UTC+1, Chris M. Thomasson wrote:
> > On 1/24/2022 6:37 PM, sobriquet wrote:
> > >
> > > https://i.imgur.com/aKrh4us.png
> > >
> > > https://www.desmos.com/calculator/nypvgblehm
> >
> > Nice work! Elegant.
> I like the way that you can figure out aspects in isolation, like how to transform
> a triangle and then plug that principle into a different context like a fractal.
>
> https://www.desmos.com/calculator/gxbwygf9yf
>
> But at the moment, it's rather slow, since the parameter traces out the entire
> outline of the fractal.
> I think I might be able to speed it up if I use the mod function so it only has to compute
> one part and then it can copy that in a 120 degree rotation a couple of times.
> > Fwiw, when you get some really free time to kill,
> > check out this older formula I came up with that generates an
> > interesting escape time Sierpinski like fractal:
> >
> > https://www.facebook.com/photo/?fbid=123930362099304&set=gm.799404557112051
> >
> > The escape time formula:
> >
> > z = (pow(z, 3.0) + (-((1.0 / 3.0) * 1.7))) / z
> >
> > I am not exactly sure how to code it up in Desmos.
> Desmos doesn't have complex numbers built-in. So you'd have to code the relevant
> operations yourself.
> Like multiplication of two complex numbers (a+bi) * (c+di) = ((ac-bd) + (ad+bc)i).
>
> https://www.desmos.com/calculator/ce99zi4fzq
>
> I'm also working a bit on the Koch curve, and I was thinking that perhaps it can be combined
> with the Sierpinski triangle into a kind of hybrid of the two or perhaps morphing between them.
>
> https://www.desmos.com/calculator/gfkaliyaf3

Desmos and Blender lack recursion. Which is a bit of a drawback when generating
fractals, as they usually are coded most elegantly relying on recursion, though you can
work your way around it.

https://www.youtube.com/watch?v=KZRbsLz_YVE

Re: Sierpinski triangle transformation

<ssqift$cvt$1@dont-email.me>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=89323&group=sci.math#89323

  copy link   Newsgroups: sci.math
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: chris.m....@gmail.com (Chris M. Thomasson)
Newsgroups: sci.math
Subject: Re: Sierpinski triangle transformation
Date: Tue, 25 Jan 2022 20:25:30 -0800
Organization: A noiseless patient Spider
Lines: 128
Message-ID: <ssqift$cvt$1@dont-email.me>
References: <8f958b4f-d43b-499f-9f27-86267ac3adf5n@googlegroups.com>
<ssprit$bso$1@dont-email.me>
<28bd5d38-cd2e-4547-aeb8-2bdc6e306537n@googlegroups.com>
<f7fd721c-f75b-4f33-90cf-bfa3dd64cb3an@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 26 Jan 2022 04:25:33 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="32df816de3047c282f753916da12bbd7";
logging-data="13309"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+MeOChKNf3d6+5Ho+uX5vSosYu5L2CDwM="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.5.1
Cancel-Lock: sha1:mvY6lnhbrIusvf0mlh6kW8XeBOc=
In-Reply-To: <f7fd721c-f75b-4f33-90cf-bfa3dd64cb3an@googlegroups.com>
Content-Language: en-US
 by: Chris M. Thomasson - Wed, 26 Jan 2022 04:25 UTC

On 1/25/2022 5:08 PM, sobriquet wrote:
> On Wednesday, January 26, 2022 at 1:13:31 AM UTC+1, sobriquet wrote:
>> On Tuesday, January 25, 2022 at 10:54:47 PM UTC+1, Chris M. Thomasson wrote:
>>> On 1/24/2022 6:37 PM, sobriquet wrote:
>>>>
>>>> https://i.imgur.com/aKrh4us.png
>>>>
>>>> https://www.desmos.com/calculator/nypvgblehm
>>>
>>> Nice work! Elegant.
>> I like the way that you can figure out aspects in isolation, like how to transform
>> a triangle and then plug that principle into a different context like a fractal.
>>
>> https://www.desmos.com/calculator/gxbwygf9yf
>>
>> But at the moment, it's rather slow, since the parameter traces out the entire
>> outline of the fractal.
>> I think I might be able to speed it up if I use the mod function so it only has to compute
>> one part and then it can copy that in a 120 degree rotation a couple of times.
>>> Fwiw, when you get some really free time to kill,
>>> check out this older formula I came up with that generates an
>>> interesting escape time Sierpinski like fractal:
>>>
>>> https://www.facebook.com/photo/?fbid=123930362099304&set=gm.799404557112051
>>>
>>> The escape time formula:
>>>
>>> z = (pow(z, 3.0) + (-((1.0 / 3.0) * 1.7))) / z
>>>
>>> I am not exactly sure how to code it up in Desmos.
>> Desmos doesn't have complex numbers built-in. So you'd have to code the relevant
>> operations yourself.
>> Like multiplication of two complex numbers (a+bi) * (c+di) = ((ac-bd) + (ad+bc)i).
>>
>> https://www.desmos.com/calculator/ce99zi4fzq
>>
>> I'm also working a bit on the Koch curve, and I was thinking that perhaps it can be combined
>> with the Sierpinski triangle into a kind of hybrid of the two or perhaps morphing between them.
>>
>> https://www.desmos.com/calculator/gfkaliyaf3
>
> Desmos and Blender lack recursion. Which is a bit of a drawback when generating
> fractals, as they usually are coded most elegantly relying on recursion, though you can
> work your way around it.
>
> https://www.youtube.com/watch?v=KZRbsLz_YVE
^^^^^^^^^^^^^^^^^^^^^

Check this out:
_________________
namespace ct_desmos_fun
{ void koch_line(
ct::plot::cairo::plot_2d& plot,
unsigned long ri,
unsigned long rn,
glm::vec2 p0,
glm::vec2 p1,
float scale
) {
if (ri >= rn) return;

float mid_scale = .5f;

glm::vec2 dif = p1 - p0;
glm::vec2 perp = { -dif.y, dif.x };

glm::vec2 mid = p0 + dif * mid_scale;

glm::vec2 kp0 = p0;
glm::vec2 kp1 = kp0 + dif * scale;
glm::vec2 kp2 = mid + perp * scale;
glm::vec2 kp3 = p1 - dif * scale;
glm::vec2 kp4 = p1;

if (ri == rn - 1)
{
plot.line(kp0, kp1, CT_RGBF(1, 0, 0), 5);
plot.line(kp1, kp2, CT_RGBF(0, 1, 0), 5);
plot.line(kp2, kp3, CT_RGBF(0, 0, 1), 5);
plot.line(kp3, kp4, CT_RGBF(1, 1, 0), 5);
}

koch_line(plot, ri + 1, rn, kp0, kp1, scale);
koch_line(plot, ri + 1, rn, kp1, kp2, scale);
koch_line(plot, ri + 1, rn, kp2, kp3, scale);
koch_line(plot, ri + 1, rn, kp3, kp4, scale);
}

void manifest(ct::plot::cairo::plot_2d& plot)
{
std::cout << "ct_desmos_fun::manifest()\n\n";

// Koch Ring
{
glm::vec2 origin = { 0, 0 };
float radius = 1.f;

unsigned long n = 6;

float angle_normal = CT_PI2 / n;

for (unsigned long i = 0; i < n; ++i)
{
float angle_0 = angle_normal * i;
float angle_1 = angle_0 + angle_normal;

glm::vec2 kp0_normal = { glm::cos(angle_0),
glm::sin(angle_0) };
glm::vec2 kp1_normal = { glm::cos(angle_1),
glm::sin(angle_1) };

glm::vec2 kp0 = origin + kp0_normal * radius;
glm::vec2 kp1 = origin + kp1_normal * radius;

koch_line(plot, 0, 2, kp0, kp1, 1.f / 3.f);
koch_line(plot, 0, 2, kp1, kp0, 1.f / 3.f);
}
}
}
} _________________

Image:

https://i.ibb.co/6YVNbCx/ct-koch.png

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor