Page 1 of 1

Scandinavian floor rugs

Posted: Sun Apr 01, 2018 7:26 am
by Henko

Code: Select all

graphics ! graphics clear 1,1,1
get screen size w,h ! cx=w/2 ! cy=h/2
'
t=20        ' thickness of the fabric
dhue=6      ' speed of color change
'
hue=rnd(360)
draw size t ! dtet=0.01
R=5 ! x=cx ! y=cy ! draw to cx,cy
for tet=0 to 2300/t step dtet
R=5+tet*t/6.2
hue+=rnd(dhue)-dhue/2 ! if hue<0 then hue+=360
pal(hue) ! draw color pal.r,pal.g,pal.b
x=cx+R*cos(tet) ! y=cy+R*sin(tet)
draw line to x,y
next tet
end

' Simple color definition function, based on HSV system
' only HUE factor (h) is required (-> restricted color range)
'
def pal(h)
r=0 ! g=0 ! b=0 ! h%=360
if h<120 or h>240 then r=palsub(abs(h-360*floor(h/240)))
if h<240 then g=palsub(abs(h-120))
if h>120 then b=palsub(abs(h-240))
end def
def palsub(e)
f=.7   ' 0<=f<=1 better balance between prim. and sec. colors
if e<60 then c=1 else ! x=(120-e)/60 ! c=x*(1+f-f*x) ! end if
return c
end def

Re: Scandinavian floor rugs

Posted: Sun Apr 01, 2018 9:52 pm
by rbytes
These are great! Now I just need to know who can print one onto an actual rug.

Re: Scandinavian floor rugs

Posted: Tue May 01, 2018 1:19 pm
by GeorgeMcGinn
When I met my then future ex wife #2 in New Jersey, she was the VP at a textile dye plant that did what you are asking for, but they did not use computers.

I can ask her to see if she is willing to call them and see if they use computers to desgin and print patterns with colors on fabrics, including rugs.

The old way they needed to run the fabric multiple times for each color. But we're talking 1980's and possibly earlier technology.

I'll let you know.
rbytes wrote:
Sun Apr 01, 2018 9:52 pm
These are great! Now I just need to know who can print one onto an actual rug.