Galaxy

By BlueThen on Apr 15, 2009

Galaxy. Not really a "galaxy" or anything like a "galaxy", but I was just testing out some new methods of looping and optimization. There are 200 particles, with some shading.
Image

;Galaxy
;Made by BlueThen on April 15, 2009
;To install, paste this script inside your remotes (alt + r)
;then type /galaxy or right click the channel or status and click "Galaxy:
menu channel,status {
  Galaxy: galaxy
}
alias Galaxy {
  window -paoCzdk0 +tnbL @Galaxy -1 -1 400 400 
  set %gal.x tokenize 32 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 $&
    101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200
  %gal.x
  scon -r gal.init $*
  set %gal.a 30
  gal.frame
}
alias -l gal.init {
  hadd -m pointx $1 $r(1,150) 
  hadd -m pointy $1 $r(1,150) 
  hadd -m pointz $1 $r(1,150)
  hadd -m angle $1 $r(1,360)
  hadd -m speed $1 $r(1,5)
  hadd -m shade $1 $r(1,255)
}
alias -l gal.frame {
  if ($window(@galaxy)) {
    clear -n @galaxy
    drawfill -n @galaxy 1 1 0 0
    %gal.x
    gal.proc $*
    inc %gal.a 10
    drawline @galaxy
    .timer -h 1 0 gal.frame
  }
  else {
    unset %gal.*
  }
}
alias -l gal.proc {
  hinc angle $1 $hget(speed, $1)
  hadd shade $1 $calc(127.5 + (127.5 * $cos($calc($hget(angle,$1) - %gal.a)).deg))
  drawdot -nr @galaxy $rgb($hget(shade,$1), $hget(shade,$1), $hget(shade,$1)) 1 $gal.iso($calc($hget(pointx,$1) * $cos($hget(angle,$1)).deg), $hget(pointy,$1), $calc($hget(pointz,$1) * $sin($hget(angle,$1)).deg))  
}
alias gal.iso {
  tokenize 32 $1-
  return $calc(($1 - $3)*0.866+200) $calc(($1 + $3)*0.5- $2 +230)
}

Comments

Sign in to comment.
Prelude   -  Apr 16, 2009

I like it BT. Maybe throw in a nebula for fun!

 Respond  
Aucun50   -  Apr 16, 2009

Another great picwin, looking forwards to seeing the new site to :)

 Respond  
Kirby   -  Apr 15, 2009

Cool BlueThen.

 Respond  
BlueThen   -  Apr 15, 2009

By the way, bluethen.com is disabled for the meantime. Expect a "new" bluethen.com soon.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.