<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.sarg.dev/index.php?action=history&amp;feed=atom&amp;title=L%C3%A9vy_C_curve</id>
	<title>Lévy C curve - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.sarg.dev/index.php?action=history&amp;feed=atom&amp;title=L%C3%A9vy_C_curve"/>
	<link rel="alternate" type="text/html" href="https://wiki.sarg.dev/index.php?title=L%C3%A9vy_C_curve&amp;action=history"/>
	<updated>2026-06-06T20:01:47Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://wiki.sarg.dev/index.php?title=L%C3%A9vy_C_curve&amp;diff=619552&amp;oldid=prev</id>
		<title>imported&gt;Robby: /* References */ link to Commons is now defined on Wikidata</title>
		<link rel="alternate" type="text/html" href="https://wiki.sarg.dev/index.php?title=L%C3%A9vy_C_curve&amp;diff=619552&amp;oldid=prev"/>
		<updated>2025-07-06T22:12:21Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;References: &lt;/span&gt; link to Commons is now defined on Wikidata&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Short description|Self-similar fractal curve}}&lt;br /&gt;
{{Redir|C curve|the weighting curve|C-weighting}}&lt;br /&gt;
In [[mathematics]], the &amp;#039;&amp;#039;&amp;#039;Lévy C curve&amp;#039;&amp;#039;&amp;#039; is a [[self-similar]] [[fractal curve]] that was first described and whose [[differentiability]] properties were analysed by [[Ernesto Cesàro]] in 1906 and [[Georg Faber]] in 1910, but now bears the name of [[France|French]] [[mathematician]] [[Paul Lévy (mathematician)|Paul Lévy]], who was the first to describe its [[self-similarity]] properties as well as to provide a geometrical construction showing it as a representative curve in the same class as the [[Koch snowflake|Koch curve]]. It is a special case of a period-doubling curve, a [[de Rham curve]].&lt;br /&gt;
&lt;br /&gt;
==L-system construction==&lt;br /&gt;
[[Image:Levy C construction.png|thumb|260px|First eight stages in the construction of a Lévy C curve]]&lt;br /&gt;
[[Image:Levy C Curve.svg|thumb|260px|Lévy C curve (from a L-system, after the first 12 stages)]]&lt;br /&gt;
If using a [[Lindenmayer system]] then the construction of the C curve starts with a straight line. An [[isosceles]] triangle with angles of 45°, 90° and 45° is built using this line as its [[hypotenuse]]. The original line is then replaced by the other two sides of this triangle.&lt;br /&gt;
&lt;br /&gt;
At the second stage, the two new lines each form the base for another right-angled isosceles triangle, and are replaced by the other two sides of their respective triangle. So, after two stages, the curve takes the appearance of three sides of a rectangle with the same length as the original line, but only half as wide.&lt;br /&gt;
&lt;br /&gt;
At each subsequent stage, each straight line segment in the curve is replaced by the other two sides of a right-angled isosceles triangle built on it. After &amp;#039;&amp;#039;n&amp;#039;&amp;#039; stages the curve consists of 2&amp;lt;sup&amp;gt;&amp;#039;&amp;#039;n&amp;#039;&amp;#039;&amp;lt;/sup&amp;gt; line segments, each of which is smaller than the original line by a factor of 2&amp;lt;sup&amp;gt;&amp;#039;&amp;#039;n&amp;#039;&amp;#039;/2&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This L-system can be described as follows:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Variables&amp;#039;&amp;#039;&amp;#039;:||{{mono|F}}&lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Constants&amp;#039;&amp;#039;&amp;#039;:||{{mono|+ &amp;amp;minus;}}&lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Start&amp;#039;&amp;#039;&amp;#039;:||{{mono|F}}&lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Rules&amp;#039;&amp;#039;&amp;#039;:||{{mono|F → +F&amp;amp;minus;&amp;amp;minus;F+}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
where &amp;quot;{{mono|F}}&amp;quot; means &amp;quot;draw forward&amp;quot;, &amp;quot;+&amp;quot; means &amp;quot;turn clockwise 45°&amp;quot;, and &amp;quot;&amp;amp;minus;&amp;quot; means &amp;quot;turn anticlockwise 45°&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The [[fractal curve]] that is the limit of this &amp;quot;infinite&amp;quot; process is the Lévy C curve. It takes its name from its resemblance to a highly ornamented version of the letter &amp;quot;C&amp;quot;. The curve resembles the finer details of the [[Pythagoras tree (fractal)|Pythagoras tree]].&lt;br /&gt;
&lt;br /&gt;
The [[Hausdorff dimension]] of the C curve equals 2 (it contains open sets), whereas the boundary has dimension about 1.9340 [http://mathworld.wolfram.com/LevyFractal.html].&lt;br /&gt;
&lt;br /&gt;
===Variations===&lt;br /&gt;
The standard C curve is built using 45° isosceles triangles. Variations of the C curve can be constructed by using isosceles triangles with angles other than 45°. As long as the angle is less than 60°, the new lines introduced at each stage are each shorter than the lines that they replace, so the construction process tends towards a limit curve. Angles less than 45° produce a fractal that is less tightly &amp;quot;curled&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==IFS construction==&lt;br /&gt;
[[Image:Lévy&amp;#039;s C-curve (IFS).jpg|thumb|200px|Lévy C curve (from IFS, infinite levels)]]&lt;br /&gt;
If using an [[iterated function system]] (IFS, or the [[chaos game]] IFS-method actually), then the construction of the C curve is a bit easier. It will need a set of two &amp;quot;rules&amp;quot; which are: Two [[point (geometry)|point]]s in a [[Plane (mathematics)|plane]] (the [[translation|translators]]), each associated with a [[scale factor]] of 1/{{radic|2}}. The first rule is a rotation of 45° and the second &amp;amp;minus;45°. This set will [[iterate]] a point [&amp;#039;&amp;#039;x&amp;#039;&amp;#039;,&amp;amp;nbsp;&amp;#039;&amp;#039;y&amp;#039;&amp;#039;] from randomly choosing any of the two rules and use the parameters associated with the rule to scale/rotate and translate the point using a 2D-[[Transformation (mathematics)|transform]] function.&lt;br /&gt;
&lt;br /&gt;
Put into formulae:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;f_1(z)=\frac{(1-i)z}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;f_2(z)=1+\frac{(1+i)(z-1)}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
from the initial set of points &amp;lt;math&amp;gt;S_0 = \{0,1\}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Sample Implementation of Levy C Curve==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
// Java Sample Implementation of Levy C Curve&lt;br /&gt;
&lt;br /&gt;
import java.awt.Color;&lt;br /&gt;
import java.awt.Graphics;&lt;br /&gt;
import java.awt.Graphics2D;&lt;br /&gt;
import javax.swing.JFrame;&lt;br /&gt;
import javax.swing.JPanel;&lt;br /&gt;
import java.util.concurrent.ThreadLocalRandom;&lt;br /&gt;
&lt;br /&gt;
public class C_curve extends JPanel {&lt;br /&gt;
&lt;br /&gt;
    public float x, y, len, alpha_angle;&lt;br /&gt;
    public int iteration_n;&lt;br /&gt;
&lt;br /&gt;
    public void paint(Graphics g) {&lt;br /&gt;
        Graphics2D g2d = (Graphics2D) g;&lt;br /&gt;
        c_curve(x, y, len, alpha_angle, iteration_n, g2d);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    public void c_curve(double x, double y, double len, double alpha_angle, int iteration_n, Graphics2D g) {&lt;br /&gt;
        double fx = x; &lt;br /&gt;
        double fy = y;&lt;br /&gt;
        double length = len;&lt;br /&gt;
        double alpha = alpha_angle;&lt;br /&gt;
        int it_n = iteration_n;&lt;br /&gt;
        if (it_n &amp;gt; 0) {&lt;br /&gt;
            length = (length / Math.sqrt(2));&lt;br /&gt;
            c_curve(fx, fy, length, (alpha + 45), (it_n - 1), g); // Recursive Call&lt;br /&gt;
            fx = (fx + (length * Math.cos(Math.toRadians(alpha + 45))));&lt;br /&gt;
            fy = (fy + (length * Math.sin(Math.toRadians(alpha + 45))));&lt;br /&gt;
            c_curve(fx, fy, length, (alpha - 45), (it_n - 1), g); // Recursive Call&lt;br /&gt;
        } else {&lt;br /&gt;
            Color[] A = {Color.RED, Color.ORANGE, Color.BLUE, Color.DARK_GRAY};&lt;br /&gt;
            g.setColor(A[ThreadLocalRandom.current().nextInt(0, A.length)]); //For Choosing Different Color Values&lt;br /&gt;
            g.drawLine((int) fx, (int) fy, (int) (fx + (length * Math.cos(Math.toRadians(alpha)))), (int) (fy + (length * Math.sin(Math.toRadians(alpha)))));&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    public static void main(String[] args) {&lt;br /&gt;
        C_curve points = new C_curve();&lt;br /&gt;
        points.x = 200; // Stating x value&lt;br /&gt;
        points.y = 100; // Stating y value&lt;br /&gt;
        points.len = 150; // Stating length value&lt;br /&gt;
        points.alpha_angle = 90; // Stating angle value&lt;br /&gt;
        points.iteration_n = 15; // Stating iteration value&lt;br /&gt;
&lt;br /&gt;
        JFrame frame = new JFrame(&amp;quot;Points&amp;quot;);&lt;br /&gt;
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);&lt;br /&gt;
        frame.add(points);&lt;br /&gt;
        frame.setSize(500, 500);&lt;br /&gt;
        frame.setLocationRelativeTo(null);&lt;br /&gt;
        frame.setVisible(true);&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Dragon curve]]&lt;br /&gt;
* [[Pythagoras tree (fractal)]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
{{Reflist}}&lt;br /&gt;
{{Commons}}&lt;br /&gt;
* Paul Lévy, &amp;#039;&amp;#039;Plane or Space Curves and Surfaces Consisting of Parts Similar to the Whole&amp;#039;&amp;#039; (1938), reprinted in &amp;#039;&amp;#039;Classics on Fractals&amp;#039;&amp;#039; Gerald A. Edgar ed. (1993) Addison-Wesley Publishing {{ISBN|0-201-58701-7}}. &lt;br /&gt;
* E. Cesaro, &amp;#039;&amp;#039;Fonctions continues sans dérivée&amp;#039;&amp;#039;, Archiv der Math. und Phys. &amp;#039;&amp;#039;&amp;#039;10&amp;#039;&amp;#039;&amp;#039; (1906) pp 57&amp;amp;ndash;63.&lt;br /&gt;
* G. Faber, &amp;#039;&amp;#039;Über stetige Funktionen II&amp;#039;&amp;#039;, Math Annalen, &amp;#039;&amp;#039;&amp;#039;69&amp;#039;&amp;#039;&amp;#039; (1910) pp 372&amp;amp;ndash;443.&lt;br /&gt;
* S. Bailey, T. Kim, R. S. Strichartz, &amp;#039;&amp;#039;Inside the Lévy dragon&amp;#039;&amp;#039;, &amp;#039;&amp;#039;[[American Mathematical Monthly]]&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;#039;109(8)&amp;#039;&amp;#039;&amp;#039; (2002) pp 689&amp;amp;ndash;703&lt;br /&gt;
&lt;br /&gt;
{{Fractals}}&lt;br /&gt;
&lt;br /&gt;
{{DEFAULTSORT:Levy C Curve}}&lt;br /&gt;
[[Category:De Rham curves]]&lt;/div&gt;</summary>
		<author><name>imported&gt;Robby</name></author>
	</entry>
</feed>