(es) Las curvas de Melissa
(eo) Kurboj de Melissa
http://dx.doi.org/10.13140/RG.2.2.34092.90243
Descripción artística:
Una curva de Lissajous delineando una figura femenina.
Motivación:
Una hermosa muchacha llamada Melissa, con una encantadora sonrisa y precioso cabello negro ondulado.
Descripción técnica:
Una versión alterada de la curva rectangular paramétrica: , con . La amplitud de la curva en el eje horizontal se alteró con un Polinomio Interpolante de Lagrange de orden , que tiene la forma:
Archivos
Código (CFDG):
# Copyright 2015 Eduardo Adam Navas López
# Este archivo es Software Libre liberado bajo la licencia GNU GPLv3 o su versión más reciente:
# http://www.gnu.org/licenses/gpl.html
#Para generar la imagen:
#$ cfdg -b 0 -s 8000 -v ANLEJY melissa.cfdg melissa.png
CF::Size = [s 2.05 2.05 ]
startshape melissa
#Número de pasos para la curva en [0,360]
MAXPASOS = 7000
#Coeficientes de la curva de Lissajous:
FX = 21
FY = 4
#Idea inicial en [0,2pi]:
#x(t) = sin(21*t)*(-0.15*cos(pi*sin(4*t)/0.7)+0.75)
#y(t) = sin(4*t)
#Alternativas de silueta:
##Exuberante:
#x1 = -1.0
#y1 = 0.7
#x2 = -0.7 #Caderas
#y2 = 0.7
#x3 = -0.1 #Cintura
#y3 = 0.45
#x4 = 0.6 #Busto
#y4 = 0.5
#x5 = 1.0 #Escote
#y5 = 0.3
##Firme:
#x1 = -1.0
#y1 = 0.7
#x2 = -0.7 #Caderas
#y2 = 0.65
#x3 = -0.1 #Cintura
#y3 = 0.45
#x4 = 0.6 #Busto
#y4 = 0.5
#x5 = 1.0 #Escote
#y5 = 0.3
##Delgada:
x1 = -1.0
y1 = 0.65
x2 = -0.7 #Caderas
y2 = 0.65
x3 = -0.1 #Cintura
y3 = 0.45
x4 = 0.6 #Busto
y4 = 0.5
x5 = 1.0 #Escote
y5 = 0.3
#Interpolación de Lagrange:
L1(X) = (X-x2)/(x1-x2) *(X-x3)/(x1-x3) *(X-x4)/(x1-x4) *(X-x5)/(x1-x5)
L2(X) = (X-x1)/(x2-x1) *(X-x3)/(x2-x3) *(X-x4)/(x2-x4) *(X-x5)/(x2-x5)
L3(X) = (X-x1)/(x3-x1) *(X-x2)/(x3-x2) *(X-x4)/(x3-x4) *(X-x5)/(x3-x5)
L4(X) = (X-x1)/(x4-x1) *(X-x2)/(x4-x2) *(X-x3)/(x4-x3) *(X-x5)/(x4-x5)
L5(X) = (X-x1)/(x5-x1) *(X-x2)/(x5-x2) *(X-x3)/(x5-x3) *(X-x4)/(x5-x4)
polinomio(X) = y1*L1(X)+y2*L2(X)+y3*L3(X)+y4*L4(X)+y5*L5(X)
path silueta {
th = 0
yth = 0
xth = 0
MOVETO(xth,yth)
loop i = MAXPASOS [] {
th = i*(360)/(MAXPASOS-1)
yth = sin(FY*th)
xth = sin(FX*th)*polinomio(yth)
LINETO(xth,yth)
}
STROKE(0.01,CF::RoundCap)[h 0 sat 1 b 0.7] #Rojo
#STROKE(0.01,CF::RoundCap)[h 293 sat 0.7 b 1] #Morado
}
shape fondo1 {
loop 100 [] {
#Colores pastel identificados al azar
#cuadro[h 288]
#cuadro[h 330]
cuadro[h 157]
cuadro[h 114]
#cuadro[h 341]
cuadro[h 176]
#cuadro[h 325]
#cuadro[h 8]
cuadro[h 198]
#cuadro[h 293]
#cuadro[h 259]
cuadro[h 78]
}
}
shape fondo2 {
loop 700 []{
#Colores pastel azulados:
cuadro[h rand(165,200) b 1 sat 0.5]
}
}
shape melissa {
fondo2[]
silueta[z 2]
}
shape cuadro {
X = rand(-1,1)
Y = rand(-1,1)
rot = rand(-10,10)
SQUARE[x X y Y r rot s 0.3]
SQUARE[x X y Y r rot sat 0.7 b 1 s 0.29]
}
No hay comentarios:
Publicar un comentario