True 3D Olympic Rings 
Author Message
 True 3D Olympic Rings

Hi George,
Those are great looking 3D Olympic circles!
How can you insert buttons and sliders to activate the drawing of the
circles to any size?
regards
Ray Catzel
Quote:
> -----Original Message-----

> Sent: Monday, September 11, 2000 6:44 PM

> Subject: [LogoForum] True 3D Olympic Rings

> to aaa
>    ; Interlaced Olympic Rings
>    ; Optmized for 1024 x 768 screen

>    perspective
>    cs
>    setsc [255 255 255]

>    setsc [0 0 0]

>    ask -1 [setxyz 0 0 1000]
>    ask -3 [setxyz 54 263 106]

>    ht
>    pu

>    localmake "rad1 140          ; Inner Radius
>    localmake "rad2 150          ; Outer Radius
>    localmake "rad3 :rad2*2*1.05 ; Horiz Spacing is a Full Diam + 5%

>    ; These are to just center it on the screen
>    localmake "xshift -:rad3
>    localmake "yshift -:rad2*0.60

>    ; All the setxyz stuff is to position the rings centered on the screen
>    ; The rolls and turns get the rings to interlace in 3D
>    localmake "twist 10
>    localmake "steps 6

>    setxyz :xshift+:rad2*0+:rad3*0 :yshift+:rad2*1 0 setpc [  0
> 0 128] lr :twist Torus :rad1 :rad2-:rad1 :steps rr
> :twist
>    setxyz :xshift+:rad2*0+:rad3*1 :yshift+:rad2*1 0 setpc [  0
> 0   0] lr :twist Torus :rad1 :rad2-:rad1 :steps rr
> :twist
>    setxyz :xshift+:rad2*0+:rad3*2 :yshift+:rad2*1 0 setpc [128
> 0   0] lr :twist Torus :rad1 :rad2-:rad1 :steps rr
> :twist
>    setxyz :xshift+:rad2*1+:rad3*0 :yshift+:rad2*0 0 setpc [128
> 128   0] rr :twist Torus :rad1 :rad2-:rad1 :steps lr
> :twist
>    setxyz :xshift+:rad2*1+:rad3*1 :yshift+:rad2*0 0 setpc [  0
> 128   0] rr :twist Torus :rad1 :rad2-:rad1 :steps lr
> :twist

>    polyview

>    ;repeat 100 [ask -3 [setxyz random 300 random 300 random 300
> show posxyz] polyview wait 120]

>    MessageBox [Loop D Loop] [Lets see that they really are interlaced]

>    ; All the rings need to be the same color for this to work
> because GIF format runs out of colors
>    setactivearea [-500 -250 500 250]
>    gifsave "olympic.gif

>    ; We know we are 1000 steps away from the origin because
> that's where we set it.
>    ; Trace back to the origin, rotate (down 5) and come back,
> then re-view (polyview)
>    localmake "append "False
>    ask -1 [rt 90 repeat 36 [up 90 bk 1000 down 10 fd 1000 down 90
> polyview (gifsave "olympics.gif 50 :append 0) make
> "append "True] lt 90]

>    pd
> end

> to GetPoint :rad
>    fd :rad
>    localmake "pos posxyz
>    bk :rad
>    output :pos
> end

> to Slice :rad1 :rad2 :step
>    ; Draw an open ended cylinder
>    localmake "i 0
>    repeat 360/:step ~
>      [
>      fd :rad1
>      down :i
>      localmake "PointA GetPoint :rad2
>      down :step
>      localmake "PointB GetPoint :rad2
>      up :step
>      up :i
>      bk :rad1
>      rt :step
>      fd :rad1
>      down :i
>      localmake "PointD GetPoint :rad2
>      down :step
>      localmake "PointC GetPoint :rad2
>      up :step
>      up :i
>      bk :rad1
>      lt :step
>      localmake "PointE posxyz
>      setposxyz :PointA
>      pd
>      polystart
>      setposxyz :PointB
>      setposxyz :PointC
>      setposxyz :PointD
>      setposxyz :PointA
>      polyend
>      pu
>      setposxyz :PointE
>      make "i :i + :step
>      ]
> end

> to Torus :rad1 :rad2 :step
>    ; Cover the surface of the torus with polygons
>    repeat 360/:step [Slice :rad1 :rad2 :step rt :step]
> end

> to zzz
> ifelse YesNoBox [Welcome] [Choose YES to run example now, Choose
> NO Study it
> now.] [aaa] [edall]
> end

> Make "startup [zzz]
> To unsubscribe from this group, send an email to:

> LogoForum messages are archived at:
> http://www.*-*-*.com/



Sat, 01 Mar 2003 21:08:02 GMT  
 True 3D Olympic Rings
Keep in mind that it takes a while to draw these and you would not
map the scrollbars dynamically to something that draws this slow.
The rings are made up of 18,000 4 sided polygons.

With the simpler Ring examples like Mike Sandy's you could call the
function that draws the rings directly in the scrollbar handler and
remove the draw button. As you move the scrollbar it would redraw
dynamically.

to aaa
; Remove the hardcoded assignment and get the values from the scrollbars
localmake "rad1 scrollbarget "rad1scroll         ; Inner Radius
localmake "rad2 scrollbarget "rad2scroll         ; Outer Radius
(print :rad1 :rad2)
end

Call rings to setup the controls

to rings
; With intense graphics you want the controls in a seperate window
windowcreate "main "ringswindow "Rings 0 0 150 150 []
; these are for feedback on the state of the scroll bar
staticcreate "ringswindow "rad1static "0 75 25 50 25
staticcreate "ringswindow "rad2static "0 75 75 50 25
; these are the scroll bars in which the callback updates the static text
controls
scrollbarcreate "ringswindow "rad1scroll 25 25 50 25 [staticupdate
"rad1static scrollbarget "rad1scroll]
scrollbarcreate "ringswindow "rad2scroll 25 75 50 25 [staticupdate
"rad2static scrollbarget "rad2scroll]
; initialize the scrollbar range and setting
scrollbarset "rad1scroll 10 200 140
scrollbarset "rad2scroll 10 200 160
; End and draw button
buttoncreate "ringswindow "endbutton "End  25 100 50 25 [windowdelete
"ringswindow]
buttoncreate "ringswindow "drawbutton "Draw 75 100 50 25 [aaa]
end

Quote:

> Hi George,
> Those are great looking 3D Olympic circles!
> How can you insert buttons and sliders to activate the drawing of the
> circles to any size?
> regards
> Ray Catzel

> > -----Original Message-----

> > Sent: Monday, September 11, 2000 6:44 PM

> > Subject: [LogoForum] True 3D Olympic Rings

> > to aaa
> >    ; Interlaced Olympic Rings
> >    ; Optmized for 1024 x 768 screen

> >    perspective
> >    cs
> >    setsc [255 255 255]

> >    setsc [0 0 0]

> >    ask -1 [setxyz 0 0 1000]
> >    ask -3 [setxyz 54 263 106]

> >    ht
> >    pu

> >    localmake "rad1 140          ; Inner Radius
> >    localmake "rad2 150          ; Outer Radius
> >    localmake "rad3 :rad2*2*1.05 ; Horiz Spacing is a Full Diam + 5%

> >    ; These are to just center it on the screen
> >    localmake "xshift -:rad3
> >    localmake "yshift -:rad2*0.60

> >    ; All the setxyz stuff is to position the rings centered on the screen
> >    ; The rolls and turns get the rings to interlace in 3D
> >    localmake "twist 10
> >    localmake "steps 6

> >    setxyz :xshift+:rad2*0+:rad3*0 :yshift+:rad2*1 0 setpc [  0
> > 0 128] lr :twist Torus :rad1 :rad2-:rad1 :steps rr
> > :twist
> >    setxyz :xshift+:rad2*0+:rad3*1 :yshift+:rad2*1 0 setpc [  0
> > 0   0] lr :twist Torus :rad1 :rad2-:rad1 :steps rr
> > :twist
> >    setxyz :xshift+:rad2*0+:rad3*2 :yshift+:rad2*1 0 setpc [128
> > 0   0] lr :twist Torus :rad1 :rad2-:rad1 :steps rr
> > :twist
> >    setxyz :xshift+:rad2*1+:rad3*0 :yshift+:rad2*0 0 setpc [128
> > 128   0] rr :twist Torus :rad1 :rad2-:rad1 :steps lr
> > :twist
> >    setxyz :xshift+:rad2*1+:rad3*1 :yshift+:rad2*0 0 setpc [  0
> > 128   0] rr :twist Torus :rad1 :rad2-:rad1 :steps lr
> > :twist

> >    polyview

> >    ;repeat 100 [ask -3 [setxyz random 300 random 300 random 300
> > show posxyz] polyview wait 120]

> >    MessageBox [Loop D Loop] [Lets see that they really are interlaced]

> >    ; All the rings need to be the same color for this to work
> > because GIF format runs out of colors
> >    setactivearea [-500 -250 500 250]
> >    gifsave "olympic.gif

> >    ; We know we are 1000 steps away from the origin because
> > that's where we set it.
> >    ; Trace back to the origin, rotate (down 5) and come back,
> > then re-view (polyview)
> >    localmake "append "False
> >    ask -1 [rt 90 repeat 36 [up 90 bk 1000 down 10 fd 1000 down 90
> > polyview (gifsave "olympics.gif 50 :append 0) make
> > "append "True] lt 90]

> >    pd
> > end

> > to GetPoint :rad
> >    fd :rad
> >    localmake "pos posxyz
> >    bk :rad
> >    output :pos
> > end

> > to Slice :rad1 :rad2 :step
> >    ; Draw an open ended cylinder
> >    localmake "i 0
> >    repeat 360/:step ~
> >      [
> >      fd :rad1
> >      down :i
> >      localmake "PointA GetPoint :rad2
> >      down :step
> >      localmake "PointB GetPoint :rad2
> >      up :step
> >      up :i
> >      bk :rad1
> >      rt :step
> >      fd :rad1
> >      down :i
> >      localmake "PointD GetPoint :rad2
> >      down :step
> >      localmake "PointC GetPoint :rad2
> >      up :step
> >      up :i
> >      bk :rad1
> >      lt :step
> >      localmake "PointE posxyz
> >      setposxyz :PointA
> >      pd
> >      polystart
> >      setposxyz :PointB
> >      setposxyz :PointC
> >      setposxyz :PointD
> >      setposxyz :PointA
> >      polyend
> >      pu
> >      setposxyz :PointE
> >      make "i :i + :step
> >      ]
> > end

> > to Torus :rad1 :rad2 :step
> >    ; Cover the surface of the torus with polygons
> >    repeat 360/:step [Slice :rad1 :rad2 :step rt :step]
> > end

> > to zzz
> > ifelse YesNoBox [Welcome] [Choose YES to run example now, Choose
> > NO Study it
> > now.] [aaa] [edall]
> > end

> > Make "startup [zzz]
> > To unsubscribe from this group, send an email to:

> > LogoForum messages are archived at:
> > http://www.egroups.com/group/LogoForum

> To unsubscribe from this group, send an email to:

> LogoForum messages are archived at:
> http://www.egroups.com/group/LogoForum

To unsubscribe from this group, send an email to:

LogoForum messages are archived at:
http://www.egroups.com/group/LogoForum


Sun, 02 Mar 2003 20:15:12 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Thanks for 3D Rings explanation

2. Thanks for 3D Rings explanation

3. VRML 3D ring

4. VRML 3D Ring

5. VRML 3D Ring

6. PLATINUM leverages True 3D visualization in Decision Support Tool

7. ring 0 to ring 123

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

9. True faiths ( was Re: The true faith )

10. HOW TRUE IS TRUE

11. Rise flag TRUE if at least one value in ARRAY is TRUE

12. True faiths ( was Re: The true faith )

 

 
Powered by phpBB® Forum Software