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 Mandelbrot for the terminal
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
 
Frank Buss  
View profile  
 More options Jul 30 2004, 5:39 pm
Newsgroups: comp.lang.lisp
From: Frank Buss <f...@frank-buss.de>
Date: Fri, 30 Jul 2004 21:39:05 +0000 (UTC)
Local: Fri, Jul 30 2004 5:39 pm
Subject: Mandelbrot for the terminal
Based on a Java program ( http://tinyurl.com/57smz ) I've implemented a
Lisp program for showing the Mandelbrot set:

  (loop for y from -1 to 1.1 by 0.1 do
        (loop for x from -2 to 1 by 0.04 do
              (let* ((c 126)
                     (z (complex x y))
                     (a z))
                (loop while (< (abs
                                (setq z (+ (* z z) a)))
                               2)
                  while (> (decf c) 32))
                (princ (code-char c))))
        (format t "~%"))

I tried to make it as short as possible and it is some chars shorter than
the Java program, if written in one line without much spaces. With CLISP,
the program is only 4 times slower than the Java program. Nice result, I
didn't expect this with my unoptimized program and using complex variables.

--
Frank Buß, f...@frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de


 
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.