Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Stupid binary clock
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Bulent Murtezaoglu  
View profile  
 More options Sep 26 2005, 8:39 pm
Newsgroups: comp.lang.lisp
From: Bulent Murtezaoglu <b...@acm.org>
Date: Tue, 27 Sep 2005 03:39:30 +0300
Local: Mon, Sep 26 2005 8:39 pm
Subject: Re: Stupid binary clock
>>>>> "ES" == Emre Sevinc <em...@bilgi.edu.tr> writes:

[...]
    ES> BTW, having "circle-shaped" LEDs would look much nicer I guess
    ES> (similar to what we see at ThinkGeek watches and clocks). ;-)

Not only does he get tech support, Emre also gets his wishes tonight.  
Here's the little hack he got:

(let ((quadric-ht (make-hash-table :test #'equal)))
  (defun draw-led (x y on/off)
    (flet ((make-led (x y)
             (let ((tl (gethash (list x y) quadric-ht)))
               (if tl tl
                   (setf (gethash (list x y) quadric-ht)
                         (glu:new-quadric))))))
      (gl:color-3f 0f0 (if on/off 1f0 0.5f0) 0f0)
      (gl:push-matrix)
      (gl:translate-f (float x) (float y) 0.0)
      (glu:partial-disk (make-led x y) 0.0d0 (float *led-size* 0.0d0) 32 1 0.0d0 360.0d0)
      (gl:pop-matrix))))

Dunno how this fits in with the rest of the code, but it seems to work
OK. (There doesn't seem to be a glu:disk in my cl-sdl.  That's how partial
disk got in there.)

BM


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.