Scandinavian floor rugs

Post Reply
Henko
Posts: 814
Joined: Tue Apr 09, 2013 12:23 pm
My devices: iPhone,iPad
Windows
Location: Groningen, Netherlands
Flag: Netherlands

Scandinavian floor rugs

Post 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

User avatar
rbytes
Posts: 1338
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone 11 Pro Max
iPad Pro 11
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet
Location: Calgary, Canada
Flag: Canada
Contact:

Re: Scandinavian floor rugs

Post by rbytes »

These are great! Now I just need to know who can print one onto an actual rug.
Attachments
D9CAF5C8-2423-45E0-8EC5-A7106CB05702.png
D9CAF5C8-2423-45E0-8EC5-A7106CB05702.png (2.05 MiB) Viewed 2151 times
The only thing that gets me down is gravity...

User avatar
GeorgeMcGinn
Posts: 435
Joined: Sat Sep 10, 2016 6:37 am
My devices: IPad Pro 10.5in
IMac
Linux i386
Windows 7 & 10
Location: Venice, FL
Flag: United States of America
Contact:

Re: Scandinavian floor rugs

Post 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.
George McGinn
Computer Scientist/Cosmologist/Writer/Photographer
Member: IEEE, IEEE Computer Society
IEEE Sensors Council & IoT Technical Community
American Association for the Advancement of Science (AAAS)

Post Reply