File:Symmetric Hesse pencil.svg
From Wikipedia, the free encyclopedia
Jump to navigation
Jump to search
Size of this PNG preview of this SVG file: 400 × 400 pixels. Other resolutions: 240 × 240 pixels | 480 × 480 pixels | 768 × 768 pixels | 1,024 × 1,024 pixels | 2,048 × 2,048 pixels.
Original file (SVG file, nominally 400 × 400 pixels, file size: 40 KB)
This file is from Wikimedia Commons and may be used by other projects. The description on its file description page there is shown below.
Summary
| DescriptionSymmetric Hesse pencil.svg |
English: Curves in the Hesse pencil of cubic curves Different colors represent different curves in the pencil, corresponding to different choices of the parameter
|
| Date | |
| Source | Own work |
| Author | David Eppstein |
| SVG development InfoField |
Source code

This media was created with Python (general-purpose programming language)
Here is a listing of the source used to create this file.
Here is a listing of the source used to create this file.
# Draw curves in the Hesse pencil x^3 + y^3 + z^3 = 3kxyz
#
# To show off the curve symmetry we use symmetric projective coordinates:
# lines x=0, y=0, and z=0 form an equilateral triangle
# with 0:0:1, 0:1:0, and 1:0:0 as vertices and 1:1:1 at its center.
# For this view the line at infinity is x+y+z = 0.
from PADS.SVG import *
from math import cos,sin,pi
import sys
o = 200+200j
bbox = 400+400j
r = 45
a = o + 0.5j*r + 3**0.5*r/2
b = o + 0.5j*r - 3**0.5*r/2
c = o + -1j*r
def p2c(p): # projective to complex, unused
px,py,pz = p
return (px*a+py*b+pz*c)/(px+py+pz)
def c2p(q): # complex to projective
q = (q-o)/r # normalize
z = (-q.imag * 2 + 1)/3
x = q.real/3**0.5 + (1-z)/2
y = -q.real/3**0.5 + (1-z)/2
return (x,y,z)
def between(p,q,s): return (1-s)*p+s*q
def root(p,q,f): # find root of function by binary search
fp = f(p)
fq = f(q)
if fp > fq:
p,q,fp,fq = q,p,fq,fp
if fp > 0: return p
if fq < 0: return q
for i in range(40):
mid = (p+q)/2
if f(mid) < 0:
p = mid
else: q = mid
return between(p,q,mid)
svg = SVG(bbox,sys.stdout)
def hesse(k):
def thefun(p):
x,y,z = c2p(p)
return x**3+y**3+z**3-3*k*x*y*z
return thefun
def onside(p,q,n):
return [between(p,q,j/n) for j in range(n)]
def beyond(p,q,n):
return [between(p,q,1-5**(j/n)) for j in range(1,n)]
# degenerate case, k=infinity, three black lines
svg.group(fill=colors.none,stroke=colors.black)
for p,q in [(a,b),(b,c),(c,a)]:
svg.segment(6*p-5*q,6*q-5*p)
svg.ungroup()
# other degenerate case, k=1, isolated point (+ line @ infty not shown)
svg.circle(o,3,fill=colors.black,stroke=colors.none)
# case k > 1 has two lobes, the outer one with three real components
def innerlobe(k,pc):
h = hesse(k)
curve = []
for i in 0,1,2:
p,q = [a,b,c][i-1], [a,b,c][i]
for tripoint in onside(p,q,9):
curve.append(root(o,tripoint,h))
curve = curve + curve[:3]
svg.polycurve(curve,opacity=pc)
def outerlobe(k,pc):
h = hesse(k)
for i in 0,1,2:
p,q,r = [a,b,c][i],[a,b,c][i-1],[a,b,c][i-2]
onlobe = root(p,8*p-7*o,h)
focus = 2*onlobe-p
wedge = list(reversed(beyond(p,q,20)))+[p]+beyond(p,r,20)
svg.polycurve([root(focus,w,h) for w in wedge],opacity=pc)
# k >> 1, draw both lobes
svg.group(fill=colors.none,stroke=colors.blue)
# outerlobe(1,"100%")
inners = [3,4,6,12,36]
opacities = ["100%", "85%","70%","55%", "40%"]
for i in range(5):
innerlobe(inners[i],opacities[i])
outerlobe(inners[i],opacities[i])
svg.ungroup()
# k > 1 but close to 1, only inner lobe visibl
svg.group(fill=colors.none,stroke=colors.green)
for i in range(4):
innerlobe([2,1.5,1.25,1.1][i],["40%","60%","80%","100%"][i])
svg.ungroup()
# k < 1, one lobe
def singlelobe(k,pc):
h = hesse(k)
for i in 0,1,2:
p,q,r = [a,b,c][i],[a,b,c][i-1],[a,b,c][i-2]
midpoint = (p+q)/2
focus = 15*midpoint-14*o
border = list(reversed(beyond(p,r,12)))+onside(p,q,12)+[q]+beyond(q,r,12)
svg.polycurve([root(focus,w,h) for w in border],opacity=pc)
svg.group(fill=colors.none,stroke=colors.red)
outers = [0,-0.5,-1,-2,-8]
opacities = ["100%", "85%","70%","55%", "40%"]
for i in range(5):
singlelobe(outers[i],opacities[i])
svg.ungroup()
svg.close()
Licensing
I, the copyright holder of this work, hereby publish it under the following license:
| This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication. | |
| The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
http://creativecommons.org/publicdomain/zero/1.0/deed.enCC0Creative Commons Zero, Public Domain Dedicationfalsefalse |
Captions
Symmetric view of the curves in the Hesse pencil of cubic curves
Items portrayed in this file
depicts
27 October 2025
40,981 byte
image/svg+xml
1b96de628250ebf4d0127ef8887b1d18f0b6511d
File history
Click on a date/time to view the file as it appeared at that time.
| Date/Time | Thumbnail | Dimensions | User | Comment | |
|---|---|---|---|---|---|
| current | 22:28, 27 October 2025 | 400 × 400 (40 KB) | wikimediacommons>David Eppstein | Uploaded own work with UploadWizard |
File usage
The following page uses this file:
Retrieved from "https://wiki.sarg.dev/index.php/File:Symmetric_Hesse_pencil.svg"