View Single Post
  #109 (permalink)  
Old 12-10-2007, 09:37 PM
colin9876 colin9876 is offline
Basic4ppc Veteran
 
Join Date: Nov 2007
Posts: 316
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Yes sorry arguments wasnt the right word ... how do u say for each rule(1,2) it looks up a few things (sort of like DIM rule(64,64) Type colchange,dy) ... maybe structure is the right word

u only look up one rule, doesnt matter how many there are in the list- only look up the one relevant to the color u are, and the color of the pixel ur going to.
Heres a rough guide - Ill give u the exact code next week when Ive got it exactly right

bithandler(px(),py(),pcolor(),pspread(),n,rules(,) )
for i=0 to n
plot(px(i),py(i),cBlack)
newpx=px(i) + our random spreadline
newpy=py(i)+1

tocolor=getpixelcolor(newpx,newpy)

if tocolor<>cblack
thisrule=rule(condense(pcolor(i)) , condense(tocolor))
newpy=py(i) + thisrule.dy
pcolor(i)= thisrule.colchange

if getpixel(newpx,newpy)<>cBlack then
newpx=px(i)
newpy=py(i)
end

end

px(i)=newpx
py(i)=newpy
plot(px(i),py(i),pcolor(i))
Next

N.B the condense function just reduces the distinction of the colors so it doesnt need a 64000x64000 rule table. Then I dont need the element look up table either

Condense(R,G,B)=((R Mod64)+1)x((G Mod64)+1)x((R Mod64)+1)
e.g condense(200,100,0)=4*3*1=12
so 4*4*4 distinct colors, rule table is rules(64x64)

Last edited by colin9876 : 12-10-2007 at 10:27 PM.
Reply With Quote