| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| If I generate a Koch snowflake of an order higher than 1, then it conflicts with my recursive algorithm because: i) A Koch Snowflake of order 1 involves generating three triangles from the sides of the initial triangle. ii) All Koch Snowflakes of order >= 2 involves the creation of only two triangles. The third is not needed because the third side becomes non-existent. How can I rectify this? I initially thought: keep it general in the sense that I should not treat the order = 1 case as special. In this way, I can check for an order >= 2 Koch Snowflake by determining which point generated ends up within the area of the polygon. I'm only posting this because I'm curious if there is a different approach that someone would have taken. -- conrad |
|
#2
| |||
| |||
| On Sep 6, 9:50*pm, conrad <con...@lawyer.com> wrote: > If I generate a Koch snowflake of > an order higher than 1, then it conflicts > with my recursive algorithm because: > i) A Koch Snowflake of order 1 involves > generating three triangles from the sides > of the initial triangle. > ii) All Koch Snowflakes of order >= 2 > involves the creation of only two > triangles. *The third is not needed > because the third side becomes > non-existent. > > How can I rectify this? > I initially thought: keep it general > in the sense that I should not > treat the order = 1 case as special. > In this way, I can check for an > order >= 2 Koch Snowflake by > determining which point generated ends > up within the area of the polygon. > > I'm only posting this because I'm > curious if there is a different approach > that someone would have taken. I'm not sure what you're saying. Here's an alogorithm to return a list of all the star vertices: function koch (k) let s = sqrt(3)/2 if k = 1 return [ [0, 1], [-s -1/2], [s, -1/2], [0, 1] ] rtn = []; for each adjacent pair [a, b] in koch(k - 1) let v = b - a c = a + 1/3 * v d = a + 2/3 * v e = s * perp(d - c) append [ a, c, e, d, b ] onto rtn return rtn Note that perp([x, y]) = [-y, x] |
|
#3
| |||
| |||
| conrad wrote: > > If I generate a Koch snowflake of an order higher than 1, then it > conflicts with my recursive algorithm because: > i) A Koch Snowflake of order 1 involves generating three > triangles from the sides of the initial triangle. > ii) All Koch Snowflakes of order >= 2 involves the creation of > only two triangles. The third is not needed because the > third side becomes non-existent. > > How can I rectify this? I initially thought: keep it general in > the sense that I should not treat the order = 1 case as special. > In this way, I can check for an order >= 2 Koch Snowflake by > determining which point generated ends up within the area of the > polygon. > > I'm only posting this because I'm curious if there is a different > approach that someone would have taken. What is a Koch snowflake? What is a Koch snowflake order? What is your recursive algorithm? -- [mail]: Chuck F (cbfalconer at maineline dot net) [page]: <http://cbfalconer.home.att.net> Try the download section. |
|
#4
| |||
| |||
| On Sun, 07 Sep 2008 04:23:54 -0400, CBFalconer wrote: > > What is a Koch snowflake? Stop pretending your stupid. > What is a Koch snowflake order? Stop pretending your stupid. > What is your recursive algorithm? Good guestion. |
|
#5
| |||
| |||
| conrad wrote: > If I generate a Koch snowflake of > an order higher than 1, then it conflicts > with my recursive algorithm because: > i) A Koch Snowflake of order 1 involves > generating three triangles from the sides > of the initial triangle. > ii) All Koch Snowflakes of order >= 2 > involves the creation of only two > triangles. The third is not needed > because the third side becomes > non-existent. > > How can I rectify this? If I understand well: Don't *count* the edges, just *walk* them. Martin -- Quidquid latine scriptum est, altum videtur. |
|
#6
| |||
| |||
| conrad wrote: ) If I generate a Koch snowflake of ) an order higher than 1, then it conflicts ) with my recursive algorithm because: ) i) A Koch Snowflake of order 1 involves ) generating three triangles from the sides ) of the initial triangle. ) ii) All Koch Snowflakes of order >= 2 ) involves the creation of only two ) triangles. The third is not needed ) because the third side becomes ) non-existent. Doesn't a Koch Snowflake work by changing each edge of the current shape into four edges ? They just happen to be at 60-degree angles, and you just happen to start with a triangle. How are you using triangles to do it ? As I see it, that would miss out a lot of sides. SaSW, Willem -- Disclaimer: I am in no way responsible for any of the statements made in the above text. For all I know I might be drugged or something.. No I'm not paranoid. You all think I'm paranoid, don't you ! #EOT |
|
#7
| |||
| |||
| CBFalconer said: <snip> > What is a Koch snowflake? Is this a joke? > What is a Koch snowflake order? An equilateral triangle is a Koch snowflake of order 0. To obtain a Koch snowflake S of order N, given a Koch snowflake K of order (N - 1): for each straight line segment on K (as it existed before any mods): (a) identify C, the central third (33.3etc%) of the line segment (b) consider C to be the base of an equilateral triangle "pointing" away from the centre of the figure (c) complete the equilateral triangle by drawing two new line segments (d) remove C from the figure endfor > What is your recursive algorithm? The Web contains many examples. -- Richard Heathfield <http://www.cpax.org.uk> Email: -http://www. +rjh@ Google users: <http://www.cpax.org.uk/prg/writings/googly.php> "Usenet is a strange place" - dmr 29 July 1999 |
|
#8
| |||
| |||
| On Sep 7, 6:11*am, Willem <wil...@stack.nl> wrote: > conrad wrote: > > ) If I generate a Koch snowflake of > ) an order higher than 1, then it conflicts > ) with my recursive algorithm because: > ) i) A Koch Snowflake of order 1 involves > ) generating three triangles from the sides > ) of the initial triangle. > ) ii) All Koch Snowflakes of order >= 2 > ) involves the creation of only two > ) triangles. *The third is not needed > ) because the third side becomes > ) non-existent. > > Doesn't a Koch Snowflake work by changing each > edge of the current shape into four edges ? > They just happen to be at 60-degree angles, > and you just happen to start with a triangle. > > How are you using triangles to do it ? > As I see it, that would miss out a lot of sides. > > SaSW, Willem > -- > Disclaimer: I am in no way responsible for any of the statements > * * * * * * made in the above text. For all I know I might be > * * * * * * drugged or something.. > * * * * * * No I'm not paranoid. You all think I'm paranoid, don't you ! > #EOT Yeah, I only realized this after I had started to write the algorithm for it. The book that I was doing the problem from did not have a complete explanation of a Koch Snowflake and so I filled in some gaps with my own ideas. However, after having found a complete explanation I understand the problem. And understanding the problem is half the battle. -- conrad |
|
#9
| |||
| |||
| Richard Heathfield wrote: > CBFalconer said: > > <snip> > >> What is a Koch snowflake? > > Is this a joke? No. I never heard of such. > >> What is a Koch snowflake order? > > An equilateral triangle is a Koch snowflake of order 0. Is it the only one? > > To obtain a Koch snowflake S of order N, given a Koch snowflake K of order > (N - 1): > > for each straight line segment on K (as it existed before any mods): > (a) identify C, the central third (33.3etc%) of the line segment > (b) consider C to be the base of an equilateral triangle "pointing" > away from the centre of the figure > (c) complete the equilateral triangle by drawing two new line segments > (d) remove C from the figure > endfor > >> What is your recursive algorithm? > > The Web contains many examples. Thanks. Two seconds work with a triangle and piece of paper gives me the idea. What are they used for? -- [mail]: Chuck F (cbfalconer at maineline dot net) [page]: <http://cbfalconer.home.att.net> Try the download section. |
|
#10
| |||
| |||
| CBFalconer said: > Richard Heathfield wrote: >> CBFalconer said: >> >> <snip> >> >>> What is a Koch snowflake? >> >> Is this a joke? > > No. I never heard of such. Sierpinksi carpet? Menger sponge? Mandelbrot set? Julia set? >>> What is a Koch snowflake order? >> >> An equilateral triangle is a Koch snowflake of order 0. > > Is it the only one? Yes. Nevertheless, you could use some other figure to get a pseudoKoch snowflake. For example, Eric Haines has produced a "sphereflake". <snip> > What are they used for? What are Mandelbrot sets used for? -- Richard Heathfield <http://www.cpax.org.uk> Email: -http://www. +rjh@ Google users: <http://www.cpax.org.uk/prg/writings/googly.php> "Usenet is a strange place" - dmr 29 July 1999 |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.