LOGO-L> 3-D Ring 
Author Message
 LOGO-L> 3-D Ring

This is a multi-part message in MIME format.

--------------210A6CE32543
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

George,

The following example is inspired by your example for shading.

In UCBLogo there are no 3-D primitives, and no real shading can be done
with single-index colors.

All I got is the following attached image.

====================================
to main
cs ht
setpensize[4 4]
for[ang 0 359][
   line
   setxy 60*sin 45+:ang 70*cos :ang]
end

to line
setpc int dist 0 0
setx xcor+30
setx xcor-60
setx xcor+30
end
====================================

Regards...

[[Yehuda]]

--------------210A6CE32543
Content-Type: image/gif; name="ring.gif"
Content-Transfer-Encoding: base64
Content-Disposition: inline; filename="ring.gif"

<encoded_portion_removed>
h03sYhv72MhONkMCAgA7
--------------210A6CE32543--

---------------------------------------------------------------





Mon, 06 Mar 2000 03:00:00 GMT  
 LOGO-L> 3-D Ring

Quote:

>In UCBLogo there are no 3-D primitives, and no real shading can be done
>with single-index colors.

We've been through this -- you can use setpalette to make a bunch
of colors with consecutive numbers and varying shades of some color.


Mon, 06 Mar 2000 03:00:00 GMT  
 LOGO-L> 3-D Ring

Even though your picture is pretty nice looking maybe you can
see now why I like RGB so much.

Quote:

> George,

> The following example is inspired by your example for shading.

> In UCBLogo there are no 3-D primitives, and no real shading can be done
> with single-index colors.

> All I got is the following attached image.

> ====================================
> to main
> cs ht
> setpensize[4 4]
> for[ang 0 359][
>    line
>    setxy 60*sin 45+:ang 70*cos :ang]
> end

> to line
> setpc int dist 0 0
> setx xcor+30
> setx xcor-60
> setx xcor+30
> end
> ====================================

> Regards...

> [[Yehuda]]

>     ---------------------------------------------------------------
>  [Image]

--
===============================================================
George Mills

http://www.softronix.com
The www page contains some very powerful educational software.
Our single most important investment is our kids.
---------------------------------------------------------------





Tue, 07 Mar 2000 03:00:00 GMT  
 LOGO-L> 3-D Ring

Quote:

> George,

> The following example is inspired by your example for shading.

> In UCBLogo there are no 3-D primitives, and no real shading can be done
> with single-index colors.

Of course you can, you just need to write a few functions
to organize the colors.

to setpcred :i
if :i=0 [setpc 1]
if :i=1 [setpc 5]
if :i=2 [setpc 23]
if :i=3 [setpc 45]
if :i=4 [setpc 67]
if :i=5 [setpc 93]
.
.
.
end

to setpcblue :i
if :i=0 [setpc 2]
if :i=1 [setpc 6]
if :i=2 [setpc 21]
if :i=3 [setpc 42]
if :i=4 [setpc 65]
if :i=5 [setpc 98]
.
.
.
end

The colors above are not correct but all you have to do
find all shades of red and order them by brightness of red.
There is probably only a dozen or so pure reds. But even
12 shades of red can be very useful.

There are better ways to write the function above of course.
There may even be a mathamatical pattern to where all the "reds"
are.

You can write a single index function for ANY "pattern" of colors.

to setpcrainbow :i
end

This of course assumes that you are not using the "palette"
feature in UCBLogo.

--
===============================================================
George Mills

http://www.softronix.com
The www page contains some very powerful educational software.
Our single most important investment is our kids.
---------------------------------------------------------------





Tue, 07 Mar 2000 03:00:00 GMT  
 LOGO-L> 3-D Ring

Quote:


> > In UCBLogo there are no 3-D primitives, and no real shading can be done
> > with single-index colors.

> Of course you can, you just need to write a few functions
> to organize the colors.

> to setpcred :i
> if :i=0 [setpc 1]
> if :i=1 [setpc 5]
> if :i=2 [setpc 23]
> if :i=3 [setpc 45]
> if :i=4 [setpc 67]
> if :i=5 [setpc 93]
> .
> .
> .
> end

> to setpcblue :i
> if :i=0 [setpc 2]
> if :i=1 [setpc 6]
> if :i=2 [setpc 21]
> if :i=3 [setpc 42]
> if :i=4 [setpc 65]
> if :i=5 [setpc 98]
> .
> .
> .
> end

> The colors above are not correct but all you have to do
> find all shades of red and order them by brightness of red.
> There is probably only a dozen or so pure reds. But even
> 12 shades of red can be very useful.

> There are better ways to write the function above of course.
> There may even be a mathamatical pattern to where all the "reds"
> are.

> You can write a single index function for ANY "pattern" of colors.

> to setpcrainbow :i
> end

> This of course assumes that you are not using the "palette"
> feature in UCBLogo.

George,

In UCBLogo there are *exactly* 16 colors numbered 1-16. Higher numbers
are automatically converted to MODULO 16. Am I wrong in my above
sentence?

[[Yehuda]]

---------------------------------------------------------------





Tue, 07 Mar 2000 03:00:00 GMT  
 LOGO-L> 3-D Ring

Quote:

>In UCBLogo there are *exactly* 16 colors numbered 1-16. Higher numbers
>are automatically converted to MODULO 16. Am I wrong in my above
>sentence?

Berkeley Logo does whatever it thinks the hardware can support.  The
DOS versions use a graphics library that tries to find out what kind
of screen you have, and tells Logo the maximum number of simultaneous
colors it can generate.

If you run BL under Windows, what happens is that Windows makes a window
that acts like a CGA screen -- hardly any colors at all.  I think that's
the source of the problem here.



Tue, 07 Mar 2000 03:00:00 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. LOGO-L> Logo Users Ring startup

2. LOGO-L> Moebius Ring Revisited

3. LOGO-L> Moebius Ring

4. Teaching Logo, not in English - and Logo Users Ring

5. ds ds

6. LOGO-L> Apple logo/MSW Logo

7. LOGO-L> Reseach Machines Logo (RM LOGO)

8. WTD: 'ls -lR '->HTML code

9. Logo Users Ring

10. ring 0 to ring 123

11. Ring 0 access from within a ring 3 program without VxD

12. Control xfer Ring 0->, triple fault!!

 

 
Powered by phpBB® Forum Software