我整出的效果图是:
而UF的效果图是:
等势圈的差别原因何在,半天不明所以。
String-ArtColoring(BOTH) {
; By Samuel Monnier, 30.9.01
init:
z = 0
float r = 0
float rtest = 0
float arg = 0
float arg2 = 0
float d = 0
final:
z = #z
r = cabs(z)
arg = atan2(z)
arg2 = arg + @phi*pi/180
if @shape == 0
rtest = (@w1/(@w1+@w2)*cos(@order1*arg)+@w2/(@w1+@w2)*cos(@order2*arg+@phi*pi/180))*(@obound-@ibound)/2+(@obound+@ibound)/2
elseif @shape == 1
rtest = (@w1/(@w1+@w2)*(2*(cos(@order1*arg)/2+.5)^@power-1)+@w2/(@w1+@w2)*(2*(cos(@order2*arg2)/2+.5)^@power-1))*(@obound-@ibound)/2+(@obound+@ibound)/2
elseif @shape == 2
rtest = (@w1/(@w1+@w2)*(2*(2*abs(arg/(2*pi)*@order1-round(arg/(2*pi)*@order1)))^@power-1)+@w2/(@w1+@w2)*(2*(2*abs(arg2/(2*pi)*@order2-round(arg2/(2*pi)*@order2)))^@power-1))*(@obound-@ibound)/2+(@obound+@ibound)/2
endif
d = abs(r-rtest)
#index = d^@thick
default:
title = "String-Art Coloring"
helpfile = "sam-help/stringart.htm"
helptopic = "strartcol"
param shape
caption = "Folium Type"
default = 0
enum = "Old" "Cosinus" "Sawtooth"
endparam
param power
caption = "Folium Power"
default = 1.0
endparam
param order1
caption = "Folium 1 Order"
default = 5.0
endparam
param w1
caption = "Folium 1 Weight"
default = 1.0
endparam
param order2
caption = "Folium 2 Order"
default = 3.0
endparam
param w2
caption = "Folium 2 Weight"
default = 0.0
endparam
param phi
caption = "Dephasage"
default = 90.0
endparam
param obound
caption = "Folium Outer Bound"
default = 2.0
endparam
param ibound
caption = "Folium Inner Bound"
default = .4
endparam
param thick
caption = "Thickness"
default = 1.0
endparam
} |