Astrolog, glyph redefinition and turtle graphics

Post your FreeBASIC source, examples, tips and tricks here. Please don’t post code without including an explanation.
lizard
Posts: 440
Joined: Oct 17, 2017 11:35
Location: Germany

Astrolog, glyph redefinition and turtle graphics

Post by lizard »

Maybe you know the old horoscope program Astrolog which now came out in version 6.30:

http://www.astrolog.org/astrolog/astfile.htm

With version 6.30 it is now possible to add any planetoid from astro.com with name and glyph to display in the chart. The difficulty is the glyph redefinition with a switch.

In "changes.htm" it is described:
9. Glyph redefinition: Astrolog can change the glyphs used to display objects in graphics charts. The new -YXD command switch takes three parameters: The object index to rename, and two strings which contain the small and large definitions to use for the object’s glyph. The small definition measures 9x9 units (and is used when drawing in the small 100% character scale), and the large definition measures 17x17 (and is used when drawing in the medium 200% character scale). If the large definition is the empty string then a double scale version of the small glyph will be used for it, and if the small definition is the empty string then the default glyph for that object will be used. Glyphs are drawn in vector format by moving a pen (similar to the “draw” command in the BASIC programming language) and drawing starts from the middle unit coordinate. Strings consist of a sequence of actions, each of which starts with a character indicating how to move the pen, following by a number indicating how many units to move in that direction (no number defaults to one unit).

The action characters “U”, “D”, “L”, and “R” move up, down, left, and right. Similarly, “E”, “F”, “G”, and “H” move 45 degrees up and to the right, down and to the right, down and left, and up and left. The action prefix “B” before one of the directions means “blank”, and moves the pen without drawing a line while moving. The prefix “N” before one of the directions means “no update”, and doesn’t move the pen after drawing a line. For example, the default small glyph for Jupiter is: “BH3RFDGDGDR5NDNR2U6E”. Special case: If a definition consists of “T” then don’t do any pen drawing at all, but instead use the three letter abbreviation of the object name for display, like is done with fixed stars.
I came to this new "astrolog.as" which must be copied do folder "astrolog" to start the program each time with these switches. Only for Vishnu i have a glyph-string for small 9x9 (character scale small and large) and big 17x17 (medium and huge). The others are shown as text ("T"). As i found it very difficult to produce the glyph-strings i have now only one 9x9 for Vishnu.

Code: Select all

@0309  ; Astrolog (6.30) default settings file astrolog.as

-z 8:01E                ; Default time zone     [hours W or E of GMT   ] ; MEZ
-z0 Autodetect          ; Default Daylight time [0 standard, 1 daylight]
-zl 13E21:00 52N29:00   ; Default location      [longitude and latitude] ; Berlin, D
-zv 167ft               ; Default elevation     [in feet or meters     ]
-zj "Current moment now" "Berlin, D" ; Default name and location         ; Berlin, D

-Yz 0   ; Time minute addition to be used when "now" charts are off.
-n      ; Comment out this line to not start with chart for "now".

_s      ; Zodiac selection          ["_s" is tropical, "=s" is sidereal]
:s 0    ; Zodiac offset value       [Change "0" to desired ayanamsa    ]
-A 5    ; Number of aspects         [Change "5" to desired number      ]
-c Plac ; House system              [Change "Plac" to desired system   ]
_k      ; Ansi color text           ["=k" is color, "_k" is normal     ] ; not colored text
:d 48   ; Searching divisions       [Change "48" to desired divisions  ]
_b0     ; Print zodiac seconds      ["_b0" to minute, "=b0" to second  ]
=b      ; Use ephemeris files       ["=b" uses them, "_b" doesn't      ]
:w 4    ; Wheel chart text rows     [Change "4" to desired wheel rows  ]
:I 80   ; Text screen columns       [Change "80" to desired columns    ]
-YQ 0   ; Text screen scroll limit  [Change "24" or set to "0" for none]
=Yd     ; European date format      ["_Yd" is MDY, "=Yd" is DMY        ] ; date format DMY
=Yt     ; European time format      ["_Yt" is AM/PM, "=Yt" is 24 hour  ] ; no am/pm
=Yv     ; European length units     ["_Yv" is imperial, "=Yv" is metric] ; metrisches system
_Yr     ; Show rounded positions    ["=Yr" rounds, "_Yr" doesn't       ]
=YC     ; Smart cusp displays       ["=YC" is smart, "_YC" is normal   ]
=YO     ; Smart copy and printing   ["=YO" does it smart, "_YO" doesn't]
_Y8     ; Clip text to end of line  ["=Y8" clips, "_Y8" doesn't clip   ]


; DEFAULT RESTRICTIONS:

-YR 0 10     1 0 0 0 0 0 0 0 0 0 0    ; Planets
-YR 11 21    1 1 1 1 1 0 1 1 1 1 1    ; Minor planets
-YR 22 33    0 1 1 1 1 1 1 1 1 0 1 1  ; House cusps
-YR 34 42    0 0 0 0 0 0 0 0 0        ; all Uranians activated

; DEFAULT TRANSIT RESTRICTIONS:

-YRT 0 10    1 0 1 0 0 0 0 0 0 0 0    ; Planets
-YRT 11 21   0 0 0 0 0 0 1 0 1 1 1    ; Minor planets
-YRT 22 33   1 1 1 1 1 1 1 1 1 1 1 1  ; House cusps
-YRT 34 42   0 0 0 0 0 0 0 0 0        ; all Uranians activated

-YR0 0 0  ; Restrict sign, direction changes

-YR7 0 1 1 0 1  ; Restrict rulerships: std, esoteric, hierarch, exalt, ray


; DEFAULT ASPECT ORBS:

-YAo 1 5     7 7 7 7 6      ; Major aspects
-YAo 6 11    3 3 3 3 2 2    ; Minor aspects
-YAo 12 18   1 1 1 1 1 1 1  ; Obscure aspects

; DEFAULT MAX PLANET ASPECT ORBS:

-YAm 0 10    360 360 360 360 360 360 360 360 360 360 360      ; Planets
-YAm 11 21   360 360 360 360 360   2   2   2 360 360   2      ; Minor planets
-YAm 22 33   360 360 360 360 360 360 360 360 360 360 360 360  ; Cusp objects
-YAm 34 42   360 360 360 360 360 360 360 360 360              ; Uranians
-YAm 43 43     2                                              ; Fixed stars

; DEFAULT PLANET ASPECT ORB ADDITIONS:

-YAd 0 10    1 1 1 0 0 0 0 0 0 0 0    ; Planets
-YAd 11 21   0 0 0 0 0 0 0 0 0 0 0    ; Minor planets
-YAd 22 33   0 0 0 0 0 0 0 0 0 0 0 0  ; Cusp objects
-YAd 34 42   0 0 0 0 0 0 0 0 0        ; Uranians
-YAd 43 43   0                        ; Fixed stars


; DEFAULT INFLUENCES:

-Yj 0 10    30 30 25 10 10 10 10 10 10 10 10     ; Planets
-Yj 11 21   5 5 5 5 5 5 5 5 5 5 5                ; Minor planets
-Yj 22 33   20 10 10 10 10 10 10 10 10 15 10 10  ; Cusp objects
-Yj 34 42   5 3 3 3 3 3 3 3 3                    ; Uranians
-Yj 43 43   2                                    ; Fixed stars

-YjC 1 12   20 0 0 10 0 0 5 0 0 15 0 0  ; Houses

-YjA 1 5    1.0 0.8 0.8 0.6 0.6          ; Major aspects
-YjA 6 11   0.4 0.4 0.2 0.2 0.2 0.2      ; Minor aspects
-YjA 12 18  0.1 0.1 0.1 0.1 0.1 0.1 0.1  ; Obscure aspects

; DEFAULT TRANSIT INFLUENCES:

-YjT 0 10   10 10 4 8 9 20 30 35 40 45 50  ; Planets
-YjT 11 21  30 15 15 15 15 30 1 1 1 1 1    ; Minor planets
-YjT 34 42  2 50 50 50 50 50 50 50 50      ; Uranians
-YjT 43 43  80                             ; Fixed stars

-Yj0 20 10 15 5  ; In ruling sign, exalted sign, ruling house, exalted house
-Yj7 10 10 10 5 5 5  ; Esoteric, Hierarchical, Ray ruling - sign, house


; DEFAULT RAYS:

-Y7C 1 12   17 4 2 37 15 26 3 4 456 137 5 26  ; Signs
-Y7O 0 10   3 2 4 4 5 6 2 3 7 6 1             ; Planets
-Y7O 34 42  1 0 0 0 0 0 0 0 0                 ; Uranians


; DEFAULT COLORS:

-YkO 0 10   Yel Ele Ele Ele Ele Ele Ele Ele Ele Ele Ele      ; Planet colors
-YkO 11 21  Mag Mag Mag Mag Mag DkC DkC DkC DkC DkC DkC      ; Minor colors
-YkO 22 33  Ele Ele Ele Ele Ele Ele Ele Ele Ele Ele Ele Ele  ; Cusp colors
-YkO 34 42  Pur Mag Pur Pur Pur Pur Pur Pur Pur              ; Uranian colors ; Vishnu made magenta
-YkA 1 5    Yel Blu Red Gre Cya          ; Major aspect colors
-YkA 6 11   Mag Mag Ora Ora DkC DkC      ; Minor aspect colors
-YkA 12 18  DkC Mar Pur Pur Mar Mar Pur  ; Obscure aspect colors

-YkC        Red Yel Gre Blu                      ; Element colors
-Yk7 1 7    Red Blu Gre Yel Ora Mag Pur          ; Ray colors
-Yk0 1 7    Red Ora Yel Gre Cya Blu Pur          ; Rainbow colors
-Yk  0 8    Bla Whi LtG Gra Mar DkG DkC DkB Mag  ; Main colors


; GRAPHICS DEFAULTS:

=X               ; Graphics chart flag ["_X" is text, "=X" is graphics]
:Xw 480 480      ; Default X and Y resolution
:Xs 200          ; Character scale [100-400]
:XS 100          ; Graphics text scale [100-400]
:Xbb             ; Bitmap file type
:YXG 1111        ; Glyph selections [Capricorn, Uranus, Pluto, Lilith]
:YXg 0           ; Aspect grid cells ["0" for autodetect]
:YX7 600         ; Esoteric ray column influence width
:YXf 2           ; Use actual fonts
:YXp 0           ; PostScript paper orientation ["-1" portrait, "1" landscape]
:YXp0 8.5in 11in ; PostScript paper X and Y sizes

; additions by lizard
                 ; uranians must be activated (see above)
                 
-YD Vulc Samadhi ; replace the name for display in chart
-Yeb Vulc 12472  ; Samadhi replacing uranian Vulcanus, file se12472s.se1 must be in folder astrolog                
-YXD Vulc "T" "T" ; replace glyphs with text   

-YD Cup Vishnu   ; replace the name for display in chart
-Yeb Cup 04034   ; Vishnu replacing uranian Cupido, file se04034s.se1                
;-YXD Cup "U4BL2D6R5U6BL2BD6D1" "U9BL3D10R1D1R4U1R1U10" ; replace glyphs (old)
-YXD Cup "U4BL2D7FR2EU7BL2BD4D2BD2D1" "T" ; replace small glyph only

-YD Had Fortuna  ; replace the name for display in chart
-Yeb Had 00019   ; Fortuna replacing uranian Hades, file se00019s.se1              
-YXD Had "T" "T" ; replace glyphs with text   

-YD Zeu Astraea  ; replace the name for display in chart
-Yeb Zeu 00005   ; Astraea replacing uranian Zeus, file se00005s.se1               
-YXD Zeu "T" "T" ; replace glyphs with text   

-YD Kro Varuna   ; replace the name for display in chart
-Yeb Kro 20000   ; Varuna replacing uranian Kronos, file se20000s.se1                
-YXD Kro "T" "T" ; replace glyphs with text   

-YD Apo Eris     ; replace the name for display in chart
-Yeb Apo 136199  ; Eris replacing uranian Apollon, file s136199s.se1                
-YXD Apo "T" "T" ; replace glyphs with text   

-YD Adm Haumea   ; replace the name for display in chart
-Yeb Adm 136108  ; Haumea replacing uranian Admetos, file s136108s.se1              
-YXD Adm "T" "T" ; replace glyphs with text   

-YD Vulk Huya    ; replace the name for display in chart
-Yeb Vulk 38628  ; Huya replacing uranian Vulkan, file se38628s.se1
-YXD Vulk "T" "T"; replace glyphs with text               

-YD Pos Chaos    ; replace the name for display in chart
-Yeb Pos 019521  ; Chaos replacing uranian Pos, file se19521s.se1
-YXD Pos "T" "T" ; replace glyphs with text             

; astrolog.as

Question would be who knows how to produce such glyph-strings with turtle graphics ?
lizard
Posts: 440
Joined: Oct 17, 2017 11:35
Location: Germany

Re: Astrolog, glyph redefinition and turtle graphics

Post by lizard »

It works even on Linux when wine is installed with rightclick /open with/wine starter.
Last edited by lizard on Feb 28, 2018 12:17, edited 1 time in total.
Munair
Posts: 1286
Joined: Oct 19, 2017 15:00
Location: Netherlands
Contact:

Re: Astrolog, glyph redefinition and turtle graphics

Post by Munair »

It seems you're an enthusiastic astrologer, but I doubt anyone can follow you on this one.

A bit off topic, a major limitation I found with both astrology and astronomy software is the inability to find all conjunctions in the solar system, including those that are non-geocentric and non-heliocentric. They have major influence: https://www.youtube.com/watch?v=zoqNDw5X6TY&t=10m16s
lizard
Posts: 440
Joined: Oct 17, 2017 11:35
Location: Germany

Re: Astrolog, glyph redefinition and turtle graphics

Post by lizard »

Munair wrote:It seems you're an enthusiastic astrologer, but I doubt anyone can follow you on this one.

A bit off topic, a major limitation I found with both astrology and astronomy software is the inability to find all conjunctions in the solar system, including those that are non-geocentric and non-heliocentric. They have major influence: https://www.youtube.com/watch?v=zoqNDw5X6TY&t=10m16s
My idea was maybe to create a editor in FB to edit the whole glyph set, as they should match each other. Leo, Virgo, Pisces, Jupiter, Saturn and Moon could be a little beautified. And then creating glyphs for all the new planetoids.

Now if found out Pullen uses exactly the same syntax like FB draw, that could simplify the thing a lot.

For the Conjunctions i have to see the video first, read you later.
lizard
Posts: 440
Joined: Oct 17, 2017 11:35
Location: Germany

Re: Astrolog, glyph redefinition and turtle graphics

Post by lizard »

Munair wrote:a major limitation I found with both astrology and astronomy software is the inability to find all conjunctions in the solar system, including those that are non-geocentric and non-heliocentric. They have major influence: https://www.youtube.com/watch?v=zoqNDw5X6TY&t=10m16s
Yes like it is said in the video, these influences are existing, but weren't considered directly in astrology before. Normal astrology is geocentric, very few use heliocentric view.

With the millenium things began to change. Now some are using the galactic center and other elements outside our solar system. Planetoids like Ceres were in discussion since 19th century. Alfred Witte even postulated "hypothetical planets", the "Uranians" which are seldom used today but can be calculated in Astrolog. They can be taken for redefinitions.

Discovery of Kuiperbelt brought even more planetoids, so that there are thousands now. And they become more and more accepted by astrologers as can be seen here:

http://www.linda-goodman.com/ubb/Forum2 ... 03010.html
lizard
Posts: 440
Joined: Oct 17, 2017 11:35
Location: Germany

Re: Astrolog, glyph redefinition and turtle graphics

Post by lizard »

This shows the glyphs in FB:

Code: Select all

' planets_1.bas
' display original glyph-strings in FB
' small size 9x9

DIM AS STRING glyph(10)
Dim AS ANY PTR buffer(10)

'original definition from xdata.cpp

glyph(0)="ND4NL4NR4U4LGLDGD2FDRFR2ERUEU2HULHL"    '/* Earth   */
glyph(1)="U0BH3DGD2FDRFR2ERUEU2HULHL2GL"          '/* Sun     */
glyph(2)="BG3E2U2H2ER2FRDFD2GDLGL2H"              '/* Moon    */
glyph(3)="BD4UNL2NR2U2REU2HNEL2NHGD2FR"           '/* Mercury */
glyph(4)="LHU2ER2FD2GLD2NL2NR2D2"                 '/* Venus   */
glyph(5)="HLG2DF2RE2UHE4ND2L2"                    '/* Mars    */
glyph(6)="BH3RFDGDGDR5NDNR2U6E"                   '/* Jupiter */
glyph(7)="BH3R2NUNR2D4ND2E2RFDGDF"                '/* Saturn  */
glyph(8)="BD4NEHURBFULU3NUNR2L2NU2DGBU5NFBR6GD3F" '/* Uranus  */
glyph(9)="BD4U2NL2NR2U5NUNRLBL2NUNLDF2R2E2UNRU"   '/* Neptune */
glyph(10)="D2NL2NR2D2BU8GFEHBL3D2F2R2E2U2"        '/* Pluto   */


SCREENRES 1000, 800

for i as integer = 0 to 10

buffer(i) = IMAGECREATE(9, 9, 8)

DRAW buffer(i), "BM4,4" & glyph(i) ' set cursor to center and add glyph
PUT (10 + 20 * i, 10), buffer(i), pset

IMAGEDESTROY buffer(i)

next i
SLEEP
lizard
Posts: 440
Joined: Oct 17, 2017 11:35
Location: Germany

Re: Astrolog, glyph redefinition and turtle graphics

Post by lizard »

What is so fascinating at the glyph-strings it must be the fastest way ever to get a symbol displayed on a background. I have tried the most common techniqes with symbols using truetype-fonts, .bmp, .png images and others. Now i found the glyph-strings beat them all in speed.

If one wants to have a few pixels on a background the fastest way would be simple draw them and finito. Nothing else needed. If a routine draws just these pixels in optimized order, this must be the fastest way ever, because it is the direct approach.

Code: Select all

' glyph_editor_1.bas
' edit glyph-strings for astrolog 6.30 in FB

SCREENRES 1000, 800
WINDOWTITLE "Glyph-String Editor for Astrolog 6.30 and others"

DIM AS STRING glyph(120), names(55)
Dim AS ANY PTR buffer(120)

' original definitions from data.cpp

' ******************************************************************************
' ** Global Tables.
' ******************************************************************************

  names(00)=""
  names(01)="Aries"
  names(02)="Taurus"
  names(03)="Gemini"
  names(04)="Cancer"
  names(05)="Leo"
  names(06)="Virgo"
  names(07)="Libra"
  names(08)="Scorpio"
  names(09)="Sagittarius"
  names(10)="Capricorn"
  names(11)="Aquarius"
  names(12)="Pisces"
  names(13)="Earth"
  names(14)="Sun"
  names(15)="Moon"
  names(16)="Mercury"
  names(17)="Venus"
  names(18)="Mars"  
  names(19)="Jupiter"
  names(20)="Saturn"
  names(21)="Uranus"
  names(22)="Neptune"
  names(23)="Pluto"
  names(24)="Chiron"
  names(25)="Ceres"
  names(26)="Pallas"
  names(27)="Juno"
  names(28)="Vesta"         
  names(29)="North Node"
  names(30)="South Node"                            
  names(31)="Lilith"
  names(32)="Fortune"
  names(33)="Vertex"
  names(34)="East Point"           
  names(35)="Ascendant"
  names(36)="2nd Cusp"
  names(37)="3rd Cusp"
  names(38)="Nadir"     ' mistake, not the same like imum coeli
  names(39)="5th Cusp"
  names(40)="6th Cusp"
  names(41)="Descendant"
  names(42)="8th Cusp"
  names(43)="9th Cusp"
  names(44)="Midheaven" ' better call it medium coeli, it's not zenit
  names(45)="11th Cusp"
  names(46)="12th Cusp"
  names(47)="Vulcan"
  names(48)="Cupido"
  names(49)="Hades"
  names(50)="Zeus"
  names(51)="Kronos"          
  names(52)="Apollon"
  names(53)="Admetos"
  names(54)="Vulkanus"
  names(55)="Poseidon"

' original definitions from xdata.cpp

' ******************************************************************************
' ** Graphics Table Data.
' ******************************************************************************

' small signs 
glyph(00)=""                                     '/* Empty        */                     
glyph(01)="ND4HU2HLGDFBR6EUHLGD2G"               '/* Aries        */
glyph(02)="BL3D2F2R2E2U2H2NE2L2NH2G2"            '/* Taurus       */
glyph(03)="BLU3LHBR7GLNL3D6NL3RFBL7ERU3"         '/* Gemini       */
glyph(04)="BFNDERFDGLNHGL2HLHBU3NEDFREUHNLER2FRF"'/* Cancer       */
glyph(05)="BF4H2UEU2H2L2G2D2FDGH"                '/* Leo          */
glyph(06)="BF4BLH2U3E2D5G2BU5U2HGND6HGND6H"      '/* Virgo        */
glyph(07)="BGNL3HUER2FDGR3BD2L8"                 '/* Libra        */
glyph(08)="BH4FND6EFND6EFD6FREU"                 '/* Scorpio      */
glyph(09)="BG4E3NH2NF2E5NL2D2"                   '/* Sagittarius  */
glyph(10)="BH3BLED4FND2EU2EUFNDERFDGLNHF2D2G"    '/* Capricorn #1 */
glyph(11)="BG4EUEDFDEUEDFDEUEBU5GDGUHUGDGUHUGDG" '/* Aquarius     */
glyph(12)="NL4NR4BH4F2D4G2BR8H2U4E2"             '/* Pisces       */
glyph(13)="BH4RFR2ER3G3D2GDFR2EU2HL3G2DG"        '/* Capricorn #2 */

' big signs 
glyph(14)="BD8U7HU3HU2H2L2G2D2F2BR12E2U2H2L2G2D2GD3G"                            '/* Aries  */
glyph(15)="BH6BU2FDFRFNR4GLGDGD4FDFRFR4EREUEU4HUHLHEREUE"                        '/* Taurus */
glyph(16)="BL2U6LHLHBR14GLGLNL6D12NL6RFRFBL14ERERU6"                             '/* Gemini */
glyph(17)="BF5NLRE2U2H2L2G2D2F2G2L4HL2H3BE6NH2D2G2L2H2U2E2R2E2R4FR2F3"           '/* Cancer */
glyph(18)="BF8H4U2E2U4HUHLHL4GLGDGD4FDFD2GL2HU"                                  '/* Leo   */
glyph(19)="BF8BL2H3UHU5E4D9GDG3BU10U4H2G2ND12H2G2ND12H2"                         '/* Virgo */
glyph(20)=""                                                                     '/* Libra */
glyph(21)="BH8F2ND12E2F2ND12E2F2D12F2RE2U3NGF"                                   '/* Scorpio */
glyph(22)=""                                                                     '/* Sagittarius  */
glyph(23)="BH6BL2E2D4FD4FND4EU2EUEU2EUF2ND2E2R2F2D2G2L2NH2F4D4G2"                '/* Capricorn #1 */
glyph(24)="BG8EUE2UEDFD2FDEUE2UEDFD2FDEUE2UEBU10GDG2DGUHU2HUGDG2DGUHU2HUGDG2DG"  '/* Aquarius */
glyph(25)="NL8NR8BH8F3DFD6GDG3BR16H3UHU6EUE3"                                    '/* Pisces */
glyph(26)="BH8RFRFR4ER2ER4G5DGD2GDGD2F2R4E2U4H2L6G4DGDG"                         '/* Capricorn #2 */

' small planets 
glyph(27)="ND4NL4NR4U4LGLDGD2FDRFR2ERUEU2HULHL"   '/* Earth   */
glyph(28)="U0BH3DGD2FDRFR2ERUEU2HULHL2GL"         '/* Sun     */
glyph(29)="BG3E2U2H2ER2FRDFD2GDLGL2H"             '/* Moon    */
glyph(30)="BD4UNL2NR2U2REU2HNEL2NHGD2FR"          '/* Mercury */
glyph(31)="LHU2ER2FD2GLD2NL2NR2D2"                '/* Venus   */
glyph(32)="HLG2DF2RE2UHE4ND2L2"                   '/* Mars    */
glyph(33)="BH3RFDGDGDR5NDNR2U6E"                  '/* Jupiter */
glyph(34)="BH3R2NUNR2D4ND2E2RFDGDF"               '/* Saturn  */
glyph(35)="BD4NEHURBFULU3NUNR2L2NU2DGBU5NFBR6GD3F"'/* Uranus #1 */
glyph(36)="BD4U2NL2NR2U5NUNRLBL2NUNLDF2R2E2UNRU"  '/* Neptune   */
glyph(37)="D2NL2NR2D2BU8GFEHBL3D2F2R2E2U2"        '/* Pluto  #1 */
glyph(38)="BG2LDFEULU3NURFRFBU5GLGLU2"            '/* Chiron          */
glyph(39)="BD4UNL3NR3U2RE2UH2L2G"                 '/* Ceres           */
glyph(40)="BD4UNL3NR3UE2HUHNUGDGF2"               '/* Pallas Athena   */
glyph(41)="BD4UNL2NR2U4NL4NR4NE3NF3NG3NH3U3"      '/* Juno            */
glyph(42)="BU4DBG3NLFDF2E2UERBH2GDGHUH"           '/* Vesta           */
glyph(43)="BG2LGFEU2HU2E2R2F2D2GD2FEHL"           '/* North Node      */
glyph(44)="BH2LHEFD2GD2F2R2E2U2HU2EFGL"           '/* South Node      */
glyph(45)="BG4E8BG2FD2G2L2H2U2E2R2F"              '/* Lilith #1       */
glyph(46)="NE2NF2NG2H2GD2F2R2E2U2H2L2G"           '/* Part of Fortune */
glyph(47)="U2NHNEBD4NGNFU2L2NHNGR4NEF"            '/* Vertex          */
glyph(48)="BH4NR3D4NR2D4R3BR2U8R2FD2GL2"          '/* East Point      */
glyph(49)="BG4U4NR2U3EFD7BR2NURU2HU2RDBR3ULD5RU"  '/* Ascendant  */
glyph(50)="BH3ER4FD2GLGLG2DR6"                    '/* 2nd Cusp   */
glyph(51)="BH3ER4FD2GNL3FD2GL4H"                  '/* 3rd Cusp   */
glyph(52)="BH4R2NR2D8NL2R2BR4NUL2U8R2D"           '/* Nadir      */
glyph(53)="BG3FR4EU2HL5U4R6"                      '/* 5th Cusp   */
glyph(54)="BE3HL4GD6FR4EU2HL4G"                   '/* 6th Cusp   */
glyph(55)="BH4D8REU6HLBF7DRU2HU2RDBG4NRU3NRU2R"   '/* Descendant */
glyph(56)="BL2GD2FR4EU2HNL4EU2HL4GD2F"            '/* 8th Cusp   */
glyph(57)="BG3FR4EU6HL4GD2FR4E"                   '/* 9th Cusp   */
glyph(58)="BG4U8F2ND6E2D8BR4NUL2U8R2D"            '/* Midheaven  */
glyph(59)="BH3ED8NLRBR2RNRU8G"                    '/* 11th Cusp  */
glyph(60)="BG4RNRU8GBR4ER2FD2GLG2D2R4"            '/* 12th Cusp  */
glyph(61)="NU4D4NH3E3"                            '/* Vulcan   */
glyph(62)="BH4BRFDG2DR8BG3UNL2NR2U5LUEFDL"        '/* Cupido   */
glyph(63)="BENUNL2NR2D3ND2NR2L2H2U2E2R4"          '/* Hades    */
glyph(64)="BU4NG2NF2D7NDBLHLBR6LGL2GLBR6LHL"      '/* Zeus     */
glyph(65)="BU2D3ND3NR2L2BH2UE2R4F2D"              '/* Kronos   */
glyph(66)="U3NLR2NRD3NL2NR2D4NRL2NLU4L4UEUH"      '/* Apollon  */
glyph(67)="BUNU2NL2NR2D2ND3LHU2ENHR2NEFD2GL"      '/* Admetos  */
glyph(68)="G2DGR6HUH2U4NG2F2"                     '/* Vulcanus */
glyph(69)="ND4U4BL3DF2R2E2UBD8UH2L2G2D"           '/* Poseidon */
glyph(70)="BD2D0BU6NG2NF2D4LGD2FR2EU2HL"          '/* Uranus #2 */
glyph(71)="BL3R5EU2HL5D8R5"                       '/* Pluto  #2 */
glyph(72)="UERHL2G2D2F2R2ELHU"                    '/* Lilith #2 */
glyph(73)="ND4U4NG3F3"                            '/* Pluto  #3 */

' big planets 
glyph(74)="ND8NL8NR8U8L2GLG3DGD4FDF3RFR4ERE3UEU4HUH3LHL2"          '/* Earth */
glyph(75)="U0BU8L2GLG3DGD4FDF3RFR4ERE3UEU4HUH3LHL2"                '/* Sun   */
glyph(76)="BG6E3UEU2HUH3E2R4FRF3DFD4GDG3LGL4H2"                    '/* Moon  */
glyph(77)=""                                                       '/* Mercury */
glyph(78)=""                                                       '/* Venus   */
glyph(79)="BELHL4G3D4F3R4E3U4HUE7ND5L5"                            '/* Mars    */
glyph(80)="BH6BRRF2D2GDGDGDGDR10ND2NR4U12E2"                       '/* Jupiter */
glyph(81)=""                                                       '/* Saturn  */
glyph(82)="BD4LGD2FR2EU2HLU6NU2NR4L4NU4D2G2BU10NF2BR12G2D6F2"      '/* Uranus #1 */
glyph(83)="BD8U4NL4NR4U10NU2NR2L2BL3LNU2NLD2FDFRFR4EREUEU2NLNRU2"  '/* Neptune   */
glyph(84)="D4NL4NR4D4BU16LGD2FR2EU2HLBL6D4FDFRFR4EREUEU4"          '/* Pluto  #1 */
glyph(85)="BG4LGD2FR2EU2HLU7RF2RF2RFBU10GLG2LG2BLU5"               '/* Chiron        */
glyph(86)="BD8U2NL6NR6U4R3E3U4H3L4G2"                              '/* Ceres         */
glyph(87)="BD8U2NL6NR6U2E4HUHUHUHNUGDGDGDGF4"                      '/* Pallas Athena */
glyph(88)="BD8U2NL4NR4U8NL7NR7NE5NF5NG5NH5U6"                      '/* Juno          */
glyph(89)="BU8D3BG5NL3DF2DF2DFEUE2UE2UR3BH4GDG2DGHUH2UH"           '/* Vesta         */
glyph(90)="BG4BDHL2GD2FR2EU5H2U4E4R4F4D4G2D5FR2EU2HL2G"            '/* North Node    */
glyph(91)="BH4BUGL2HU2ER2FD5G2D4F4R4E4U4H2U5ER2FD2GL2H"            '/* South Node    */
glyph(92)=""                                                       '/* Lilith #1       */
glyph(93)=""                                                       '/* Part of Fortune */
glyph(94)=""                                                       '/* Vertex          */
glyph(95)=""                                                       '/* East Point      */
glyph(96)="BG8U8NR4U6E2F2D14BR4NHREU3HLHU3ERFBR6HLGD8FRE"          '/* Ascendant */
glyph(97)=""                                                       '/* 2nd Cusp  */
glyph(98)=""                                                       '/* 3rd Cusp  */
glyph(99)="BH8R4NR4D16NL4R4BR8BUNUGL3HU14ER3FD"                    '/* Nadir */
glyph(100)=""                                                      '/* 5th Cusp  */
glyph(101)=""                                                      '/* 6th Cusp  */
glyph(102)="BH8D16R2E2U12H2L2BF14BGFREU3HLHU3ERFBG9NR3U5NR3U5R3"   '/* Descendant */
glyph(103)=""                                                      '/* 8th Cusp  */
glyph(104)=""                                                      '/* 9th Cusp  */
glyph(105)="BG8U16F4ND12E4D16BR8BUNUGL3HU14ER3FD"                  '/* Midheaven */
glyph(106)=""                                                      '/* 11th Cusp */
glyph(107)=""                                                      '/* 12th Cusp */
glyph(108)=""                                                      '/* Vulcan    */
glyph(109)="BH8BR2F2D2G2DG2DR16BG6U2NL4NR4U10LHU2ER2FD2GL"         '/* Cupido    */
glyph(110)=""                                                      '/* Hades     */
glyph(111)="BU8NG4NF4D14ND2BLHL2HLBR12LGL2GL2GL2GLBR12LHL2HL"      '/* Zeus      */
glyph(112)=""                                                      '/* Kronos    */
glyph(113)="U6NL2R4NR2D6NL4NR4D8NR2L4NL2U8L8UE2U3H2"               '/* Apollon   */
glyph(114)=""                                                      '/* Admetos   */
glyph(115)="G2DG2DG2R12H2UH2UH2U8NG4F4"                            '/* Vulcanus  */
glyph(116)=""                                                      '/* Poseidon  */
glyph(117)=""                                                      '/* Uranus #2 */
glyph(118)=""                                                      '/* Pluto  #2 */
glyph(119)=""                                                      '/* Lilith #2 */
glyph(120)=""                                                      '/* Pluto  #3 */

dim as short x,i

' small signs
for x = 0 to 11
i = x + 1
buffer(i) = IMAGECREATE(9, 9, 2)
DRAW buffer(i), "BM4,4" & glyph(i) ' set cursor to center and add glyph
PUT (10 + 20 * x, 10), buffer(i), pset
next x

' big signs
for x = 0 to 11
i = x + 14
buffer(i) = IMAGECREATE(17, 17, 2)
DRAW buffer(i), "BM8,8" & glyph(i) ' set cursor to center and add glyph
PUT (10 + 20 * x, 30), buffer(i), pset
next x

' small planets
for x = 0 to 46
i = x + 27
buffer(i) = IMAGECREATE(9, 9, 2)
DRAW buffer(i), "BM4,4" & glyph(i) ' set cursor to center and add glyph
PUT (10 + 20 * x, 70), buffer(i), pset
next x

' big planets
for x = 0 to 46
i = x + 74
buffer(i) = IMAGECREATE(17, 17, 2)
DRAW buffer(i), "BM8,8" & glyph(i) ' set cursor to center and add glyph
PUT (10 + 20 * x, 90), buffer(i), pset
next x

SLEEP

for x = 0 to 120
IMAGEDESTROY buffer(x)
next x

END

Now we see the sad reality: Pullen left out many of the big glyphs leaving us with a suboptimal display.
dodicat
Posts: 7976
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: Astrolog, glyph redefinition and turtle graphics

Post by dodicat »

I agree with you.
Draw can be a very useful tool for some tasks, and an important part of FeeeBASIC.
Astrology is not my thing.
I looked up Scorpio (I thought lt's symbol was a scorpion) but It turns out there are others.

Code: Select all

Dim as string zz = _
"S4C4278241280BM400,300M+-9,-6M+0,-10M+4,-13M+8,-7M+9,-6"_
&"M+8,-3M+10,-1M+10,2M+4,6M+4,2M+3,-4"_
&"M+9,-4M+8,-3M+10,1M+9,3M+7,6M+9,-5M+9,-3M+3,-1M+7,-2M+9,1"_
&"M+11,8M+8,8M+4,10M+2,16M+0,30M+1,46"_
&"M+3,6M+8,6M+6,-1M+-1,-6M+2,-7M+4,-4"_
&"M+7,-2M+9,5M+19,18M+3,7M+-3,5M+-23,23"_
&"M+-14,2M+-2,-7M+2,-10M+-16,-4M+-18,-10M+-7,-11"_
&"M+-1,-3M+-1,-89M+-4,-8M+-8,-5M+-7,2M+-5,6"_
&"M+-3,10M+1,87M+-5,8M+-7,2M+-6,-3M+-3,-6"_
&"M+-1,-92M+-3,-10M+-9,-4M+-10,4M+-3,11M+0,87"_
&"M+-8,13M+-10,0M+-4,-6M+-1,-39M+1,-42M+0,-16"_
&"M+-5,-9M+-14,-1M+-7,6M+-5,12M+-5,3M+-5,-1"_
&"BM+100,-20P4287795858,4278241280"

Screen 19, 32
dim as long a
do
    screenlock
    cls
   draw "Ta" +str(a) + zz
  screenunlock 
  sleep 10
a-=1
loop until len(inkey)
Sleep
 
lizard
Posts: 440
Joined: Oct 17, 2017 11:35
Location: Germany

Re: Astrolog, glyph redefinition and turtle graphics

Post by lizard »

Great Dodicat. This system can be used for many things. The editor can be used for other purposes with little changes.
lizard
Posts: 440
Joined: Oct 17, 2017 11:35
Location: Germany

Re: Astrolog, glyph redefinition and turtle graphics

Post by lizard »

This editor version works. Somehow. It is possible to load, save and write a file with the switches for astrolog.as which can be pasted at the end of this file. With < enter> one comes to editor from there with <tab> to the upper and back and with <enter> again to choice. Movement with yellow color is invisible, press <V> to draw visible and <T> to take drawing into array. Some keys are not implemented now. <Esc> ends. Or <Ctrl + C> at any point to immediate end.

Code: Select all

' glyph-string editor.bas
' edit glyph-strings for astrolog 6.30 and others in FreeBASIC

#include "fbgfx.bi"
using fb
 
screenres 1115, 888, 4,, GFX_ALWAYS_ON_TOP  ' 16 colors
windowtitle "Glyph-String Editor v 0.1 for astrolog 6.30 and others"

type box
x as integer
y as integer
aktiv as short
end type

dim shared as box small(9,9),big(17,17)
dim shared as integer sx,sy,ox,oy,ux,uy,lx,ly,visible,nomove
dim shared as integer i,c1,c2,c3,x,y,onr,nr,zahl,speed,outside,p
dim shared as string smallglyph, bigglyph, glyph(109), names(54), help(54)
dim shared as string g,gold,gnew,g2,gold2,gnew2
dim shared as any ptr buffer(109)

speed=1600 ' adjust speed here if needed 

declare sub showglyphs
declare sub loadglyphs
declare sub saveglyphs
declare sub writeswitch
declare sub upper
declare sub editor
declare sub showbig
declare sub showsmall
declare sub moverect

' original definitions from data.cpp

' ******************************************************************************
' ** Global Tables.
' ******************************************************************************
names(00)="Aries"
names(01)="Taurus"
names(02)="Gemini"
names(03)="Cancer"
names(04)="Leo"
names(05)="Virgo"
names(06)="Libra"
names(07)="Scorpio"
names(08)="Sagittarius"
names(09)="Capricorn"
names(10)="Aquarius"
names(11)="Pisces"
names(12)="Earth"
names(13)="Sun"
names(14)="Moon"
names(15)="Mercury"
names(16)="Venus"
names(17)="Mars"  
names(18)="Jupiter"
names(19)="Saturn"
names(20)="Uranus"
names(21)="Neptune"
names(22)="Pluto"
names(23)="Chiron"
names(24)="Ceres"
names(25)="Pallas"
names(26)="Juno"
names(27)="Vesta"         
names(28)="North Node"
names(29)="South Node"                            
names(30)="Lilith"
names(31)="Fortune"
names(32)="Vertex"
names(33)="East Point"           
names(34)="Ascendant"
names(35)="2nd Cusp"
names(36)="3rd Cusp"
names(37)="Nadir"     ' mistake, not the same like imum coeli
names(38)="5th Cusp"
names(39)="6th Cusp"
names(40)="Descendant"
names(41)="8th Cusp"
names(42)="9th Cusp"
names(43)="Midheaven" ' better call it medium coeli, it's not zenit
names(44)="11th Cusp"
names(45)="12th Cusp"
names(46)="Vulcan"
names(47)="Cupido"
names(48)="Hades"
names(49)="Zeus"
names(50)="Kronos"          
names(51)="Apollon"
names(52)="Admetos"
names(53)="Vulkanus"
names(54)="Poseidon"

' original definitions from xdata.cpp

' ******************************************************************************
' ** Graphics Table Data.
' ******************************************************************************

' doubled defineds taken out here

' small signs                   
glyph(00)="ND4HU2HLGDFBR6EUHLGD2G"               '/* Aries        */
glyph(01)="BL3D2F2R2E2U2H2NE2L2NH2G2"            '/* Taurus       */
glyph(02)="BLU3LHBR7GLNL3D6NL3RFBL7ERU3"         '/* Gemini       */
glyph(03)="BFNDERFDGLNHGL2HLHBU3NEDFREUHNLER2FRF"'/* Cancer       */
glyph(04)="BF4H2UEU2H2L2G2D2FDGH"                '/* Leo          */
glyph(05)="BF4BLH2U3E2D5G2BU5U2HGND6HGND6H"      '/* Virgo        */
glyph(06)="BGNL3HUER2FDGR3BD2L8"                 '/* Libra        */
glyph(07)="BH4FND6EFND6EFD6FREU"                 '/* Scorpio      */
glyph(08)="BG4E3NH2NF2E5NL2D2"                   '/* Sagittarius  */
glyph(09)="BH3BLED4FND2EU2EUFNDERFDGLNHF2D2G"    '/* Capricorn #1 */
glyph(10)="BG4EUEDFDEUEDFDEUEBU5GDGUHUGDGUHUGDG" '/* Aquarius     */
glyph(11)="NL4NR4BH4F2D4G2BR8H2U4E2"             '/* Pisces       */

' small planets 
glyph(12)="ND4NL4NR4U4LGLDGD2FDRFR2ERUEU2HULHL"   '/* Earth   */
glyph(13)="U0BH3DGD2FDRFR2ERUEU2HULHL2GL"         '/* Sun     */
glyph(14)="BG3E2U2H2ER2FRDFD2GDLGL2H"             '/* Moon    */
glyph(15)="BD4UNL2NR2U2REU2HNEL2NHGD2FR"          '/* Mercury */
glyph(16)="LHU2ER2FD2GLD2NL2NR2D2"                '/* Venus   */
glyph(17)="HLG2DF2RE2UHE4ND2L2"                   '/* Mars    */
glyph(18)="BH3RFDGDGDR5NDNR2U6E"                  '/* Jupiter */
glyph(19)="BH3R2NUNR2D4ND2E2RFDGDF"               '/* Saturn  */
glyph(20)="BD4NEHURBFULU3NUNR2L2NU2DGBU5NFBR6GD3F"'/* Uranus #1 */
glyph(21)="BD4U2NL2NR2U5NUNRLBL2NUNLDF2R2E2UNRU"  '/* Neptune   */
glyph(22)="D2NL2NR2D2BU8GFEHBL3D2F2R2E2U2"        '/* Pluto  #1 */
glyph(23)="BG2LDFEULU3NURFRFBU5GLGLU2"            '/* Chiron          */
glyph(24)="BD4UNL3NR3U2RE2UH2L2G"                 '/* Ceres           */
glyph(25)="BD4UNL3NR3UE2HUHNUGDGF2"               '/* Pallas Athena   */
glyph(26)="BD4UNL2NR2U4NL4NR4NE3NF3NG3NH3U3"      '/* Juno            */
glyph(27)="BU4DBG3NLFDF2E2UERBH2GDGHUH"           '/* Vesta           */
glyph(28)="BG2LGFEU2HU2E2R2F2D2GD2FEHL"           '/* North Node      */
glyph(29)="BH2LHEFD2GD2F2R2E2U2HU2EFGL"           '/* South Node      */
glyph(30)="BG4E8BG2FD2G2L2H2U2E2R2F"              '/* Lilith #1       */
glyph(31)="NE2NF2NG2H2GD2F2R2E2U2H2L2G"           '/* Part of Fortune */
glyph(32)="U2NHNEBD4NGNFU2L2NHNGR4NEF"            '/* Vertex          */
glyph(33)="BH4NR3D4NR2D4R3BR2U8R2FD2GL2"          '/* East Point      */
glyph(34)="BG4U4NR2U3EFD7BR2NURU2HU2RDBR3ULD5RU"  '/* Ascendant  */
glyph(35)="BH3ER4FD2GLGLG2DR6"                    '/* 2nd Cusp   */
glyph(36)="BH3ER4FD2GNL3FD2GL4H"                  '/* 3rd Cusp   */
glyph(37)="BH4R2NR2D8NL2R2BR4NUL2U8R2D"           '/* Nadir      */
glyph(38)="BG3FR4EU2HL5U4R6"                      '/* 5th Cusp   */
glyph(39)="BE3HL4GD6FR4EU2HL4G"                   '/* 6th Cusp   */
glyph(40)="BH4D8REU6HLBF7DRU2HU2RDBG4NRU3NRU2R"   '/* Descendant */
glyph(41)="BL2GD2FR4EU2HNL4EU2HL4GD2F"            '/* 8th Cusp   */
glyph(42)="BG3FR4EU6HL4GD2FR4E"                   '/* 9th Cusp   */
glyph(43)="BG4U8F2ND6E2D8BR4NUL2U8R2D"            '/* Midheaven  */
glyph(44)="BH3ED8NLRBR2RNRU8G"                    '/* 11th Cusp  */
glyph(45)="BG4RNRU8GBR4ER2FD2GLG2D2R4"            '/* 12th Cusp  */
glyph(46)="NU4D4NH3E3"                            '/* Vulcan   */
glyph(47)="BH4BRFDG2DR8BG3UNL2NR2U5LUEFDL"        '/* Cupido   */
glyph(48)="BENUNL2NR2D3ND2NR2L2H2U2E2R4"          '/* Hades    */
glyph(49)="BU4NG2NF2D7NDBLHLBR6LGL2GLBR6LHL"      '/* Zeus     */
glyph(50)="BU2D3ND3NR2L2BH2UE2R4F2D"              '/* Kronos   */
glyph(51)="U3NLR2NRD3NL2NR2D4NRL2NLU4L4UEUH"      '/* Apollon  */
glyph(52)="BUNU2NL2NR2D2ND3LHU2ENHR2NEFD2GL"      '/* Admetos  */
glyph(53)="G2DGR6HUH2U4NG2F2"                     '/* Vulcanus */
glyph(54)="ND4U4BL3DF2R2E2UBD8UH2L2G2D"           '/* Poseidon */

' big signs 
glyph(55)="BD8U7HU3HU2H2L2G2D2F2BR12E2U2H2L2G2D2GD3G"                            '/* Aries  */
glyph(56)="BH6BU2FDFRFNR4GLGDGD4FDFRFR4EREUEU4HUHLHEREUE"                        '/* Taurus */
glyph(57)="BL2U6LHLHBR14GLGLNL6D12NL6RFRFBL14ERERU6"                             '/* Gemini */
glyph(58)="BF5NLRE2U2H2L2G2D2F2G2L4HL2H3BE6NH2D2G2L2H2U2E2R2E2R4FR2F3"           '/* Cancer */
glyph(59)="BF8H4U2E2U4HUHLHL4GLGDGD4FDFD2GL2HU"                                  '/* Leo   */
glyph(60)="BF8BL2H3UHU5E4D9GDG3BU10U4H2G2ND12H2G2ND12H2"                         '/* Virgo */
glyph(61)=""                                                                     '/* Libra */
glyph(62)="BH8F2ND12E2F2ND12E2F2D12F2RE2U3NGF"                                   '/* Scorpio */
glyph(63)=""                                                                     '/* Sagittarius  */
glyph(64)="BH6BL2E2D4FD4FND4EU2EUEU2EUF2ND2E2R2F2D2G2L2NH2F4D4G2"                '/* Capricorn #1 */
glyph(65)="BG8EUE2UEDFD2FDEUE2UEDFD2FDEUE2UEBU10GDG2DGUHU2HUGDG2DGUHU2HUGDG2DG"  '/* Aquarius */
glyph(66)="NL8NR8BH8F3DFD6GDG3BR16H3UHU6EUE3"                                    '/* Pisces */

' big planets 
glyph(67)="ND8NL8NR8U8L2GLG3DGD4FDF3RFR4ERE3UEU4HUH3LHL2"          '/* Earth */
glyph(68)="U0BU8L2GLG3DGD4FDF3RFR4ERE3UEU4HUH3LHL2"                '/* Sun   */
glyph(69)="BG6E3UEU2HUH3E2R4FRF3DFD4GDG3LGL4H2"                    '/* Moon  */
glyph(70)=""                                                       '/* Mercury */
glyph(71)=""                                                       '/* Venus   */
glyph(72)="BELHL4G3D4F3R4E3U4HUE7ND5L5"                            '/* Mars    */
glyph(73)="BH6BRRF2D2GDGDGDGDR10ND2NR4U12E2"                       '/* Jupiter */
glyph(74)=""                                                       '/* Saturn  */
glyph(75)="BD4LGD2FR2EU2HLU6NU2NR4L4NU4D2G2BU10NF2BR12G2D6F2"      '/* Uranus #1 */
glyph(76)="BD8U4NL4NR4U10NU2NR2L2BL3LNU2NLD2FDFRFR4EREUEU2NLNRU2"  '/* Neptune   */
glyph(77)="D4NL4NR4D4BU16LGD2FR2EU2HLBL6D4FDFRFR4EREUEU4"          '/* Pluto  #1 */
glyph(78)="BG4LGD2FR2EU2HLU7RF2RF2RFBU10GLG2LG2BLU5"               '/* Chiron        */
glyph(79)="BD8U2NL6NR6U4R3E3U4H3L4G2"                              '/* Ceres         */
glyph(80)="BD8U2NL6NR6U2E4HUHUHUHNUGDGDGDGF4"                      '/* Pallas Athena */
glyph(81)="BD8U2NL4NR4U8NL7NR7NE5NF5NG5NH5U6"                      '/* Juno          */
glyph(82)="BU8D3BG5NL3DF2DF2DFEUE2UE2UR3BH4GDG2DGHUH2UH"           '/* Vesta         */
glyph(83)="BG4BDHL2GD2FR2EU5H2U4E4R4F4D4G2D5FR2EU2HL2G"            '/* North Node    */
glyph(84)="BH4BUGL2HU2ER2FD5G2D4F4R4E4U4H2U5ER2FD2GL2H"            '/* South Node    */
glyph(85)=""                                                       '/* Lilith #1       */
glyph(86)=""                                                       '/* Part of Fortune */
glyph(87)=""                                                       '/* Vertex          */
glyph(88)=""                                                       '/* East Point      */
glyph(89)="BG8U8NR4U6E2F2D14BR4NHREU3HLHU3ERFBR6HLGD8FRE"          '/* Ascendant */
glyph(90)=""                                                       '/* 2nd Cusp  */
glyph(91)=""                                                       '/* 3rd Cusp  */
glyph(92)="BH8R4NR4D16NL4R4BR8BUNUGL3HU14ER3FD"                    '/* Nadir */
glyph(93)=""                                                       '/* 5th Cusp  */
glyph(94)=""                                                       '/* 6th Cusp  */
glyph(95)="BH8D16R2E2U12H2L2BF14BGFREU3HLHU3ERFBG9NR3U5NR3U5R3"    '/* Descendant */
glyph(96)=""                                                       '/* 8th Cusp  */
glyph(97)=""                                                       '/* 9th Cusp  */
glyph(98)="BG8U16F4ND12E4D16BR8BUNUGL3HU14ER3FD"                   '/* Midheaven */
glyph(99)=""                                                       '/* 11th Cusp */
glyph(100)=""                                                      '/* 12th Cusp */
glyph(101)=""                                                      '/* Vulcan    */
glyph(102)="BH8BR2F2D2G2DG2DR16BG6U2NL4NR4U10LHU2ER2FD2GL"         '/* Cupido    */
glyph(103)=""                                                      '/* Hades     */
glyph(104)="BU8NG4NF4D14ND2BLHL2HLBR12LGL2GL2GL2GLBR12LHL2HL"      '/* Zeus      */
glyph(105)=""                                                      '/* Kronos    */
glyph(106)="U6NL2R4NR2D6NL4NR4D8NR2L4NL2U8L8UE2U3H2"               '/* Apollon   */
glyph(107)=""                                                      '/* Admetos   */
glyph(108)="G2DG2DG2R12H2UH2UH2U8NG4F4"                            '/* Vulcanus  */
glyph(109)=""                                                      '/* Poseidon  */

' help
help(00)=""
help(01)="Choice Mode:"
help(02)=""
help(03)="<Up>    Up"
help(04)="<Down>  Down"    
help(05)="<Left>  Left"
help(06)="<Right> Right"
help(07)="<Enter> Edit"
help(08)=""
help(09)="<1> Color 1 "
help(10)="<2> Color 2"
help(11)="<3> Color 3"
help(12)="<4> Color 4"
help(13)=""
help(14)=""
help(15)=""
help(16)=""
help(17)="<L> Load  Glyphs"
help(18)="<S> Save  Glyphs"
help(19)="<W> Write Switches"
help(20)=""
help(21)="<Esc> Exit"
help(22)=""
help(23)=""
help(24)=""
help(25)=""
help(26)="Edit Mode:"  
help(27)=""
help(28)="<Tab> Upper/Lower"    
help(29)=""
help(30)="<Up>    Up"
help(31)="<Down>  Down"    
help(32)="<Left>  Left"
help(33)="<Right> Right"
help(34)="<E> NE"
help(35)="<F> SE"
help(36)="<G> SW"
help(37)="<H> NW"
help(38)=""    
help(39)=""
help(40)=""
help(41)=""
help(42)="<C> Clear"
help(43)=""
help(44)="<U> Undo"
help(45)=""
help(46)="<T> Take in Array"
help(47)="<V> Visible"
help(48)="<N> Nomove"
help(49)=""
help(50)="" 
help(51)=""     
help(52)="<Enter> Back"
help(53)=""
help(54)="<Ctrl+C> Hot Seat"

' create editor coords and show

ox=425
oy=190

line(215,170) - step (640,620),6,bf ' draw backbox
   
for sx = 1 to 9
  for sy = 1 to 9
    small(sx,sy).x = ox + sx * 20
    small(sx,sy).y = oy + sy * 20
  next sy
next sx

ox=345
oy+=200

for sx = 1 to 17
  for sy = 1 to 17
    big(sx,sy).x = ox + sx * 20
    big(sx,sy).y = oy + sy * 20
  next sy
next sx

'ox=90
'oy=10

for sx = 1 to 9
  for sy = 1 to 9
    with small(sx,sy)
    if .aktiv = 1 then
      line(.x,.y) - step (18,18),1,bf
    else
     line(.x,.y) - step (18,18),15,bf
    end if
    end with
  next sy
next sx

'ox=10
'oy+=210

for sx = 1 to 17
  for sy = 1 to 17
    with big(sx,sy)
    if .aktiv = 1 then
      line(.x,.y) - step (18,18),1,bf
    else
      line(.x,.y) - step (18,18),15,bf
    end if
    end with
  next sy
next sx

sub showglyphs
   color 15,0
   ' show small glyphs
   for x = 0 to 54 
   i = x '+ 1
   buffer(i) = imagecreate(9, 9, 2)
   draw buffer(i), "bm4,4" & glyph(i) ' set cursor to center and add glyph
   put (14 + 20 * x, 10), buffer(i), pset
   next x
   
    ' show big glyphs
   for x = 0 to 54
   i = x + 55
   buffer(i) = imagecreate(17, 17, 2)
   draw buffer(i), "bm8,8" & glyph(i) ' set cursor to center and add glyph
   put (10 + 20 * x, 30), buffer(i), pset
   next x
   
   ' show names
   color 15,0
   for i = 0 to 54
   draw string (50, 120 + i*13), names(i)
   next i
   
   ' show help
   for i = 0 to 54
   draw string ( 920, 120 + i*13), help(i)
   next i
   
   ' show small glyph string
   color 0,0
   line(10,80) - step (1094,14),15,bf
   draw string (14,84), smallglyph ' draw small glyph-string
  
   ' show big glyph string
   line(10,852) - step (1094,14),15,bf ' erase background
   draw string (14,856), bigglyph ' draw big glyph-string
end sub

sub loadglyphs  ' open and read the file
   dim as integer filehandle 
   filehandle = freefile
   open "glyphs.txt" for input as #filehandle
   for i = 0 to 109
     line input #filehandle, glyph(i)  
   next i          
   close #filehandle
   showglyphs
end sub

sub saveglyphs  ' open and write the file
   dim as integer filehandle 
   filehandle = freefile
   open "glyphs.txt" for output as #filehandle
   for i = 0 to 109
      print #filehandle, glyph(i)
   next i
   close #filehandle
end sub

sub writeswitch ' open and write the file with switches
   dim as integer filehandle 
   dim as string zeile
   filehandle = freefile
   open "astroglyphs.txt" for output as #filehandle  
   print #filehandle, ""
   print #filehandle, "; IMPORTANT! If you make redefinitions of the Uranians below please uncheck"
   print #filehandle, "; Uranians in 'SETTING/INCLUDE URANIANS' before 'VIEW/SHOW INTERPRETATIONS'."
   print #filehandle, ";The new names would be shown with the old texts of the Uranians! IMPORTANT!"
   print #filehandle, ""
   print #filehandle, "; Paste at the end of astrolog.as."
   print #filehandle, "; ----------------------------------------------------------------------------"
   print #filehandle,""
   for i = 0 to 54 ' write switches
     zeile = "-yxd " & names(i)  & " " & chr(34) & glyph(i) & chr(34) & " " & chr(34) & glyph(i+55) & chr(34)
     print #filehandle, zeile
   next i
  close #filehandle                   
end sub

sub upper
  ux=5:uy=5:visible=0
  do
    sleep speed ' adjust speed here if needed  
    
    if multikey(SC_CONTROL)and (multikey(SC_c) or multikey(SC_C)) then end ' hot seat
    if multikey(SC_1)                          then c3 += 1
    if multikey(SC_left)                       then ux -= 1      :p=1:g="L"
    if multikey(SC_right)                      then ux += 1      :p=1:g="R"
    if multikey(SC_up)                         then uy -= 1      :p=1:g="U"
    if multikey(SC_down)                       then uy += 1      :p=1:g="D"
    if multikey(SC_PAGEUP) or multikey(SC_g)   then ux += 1:uy-=1:p=1:g="G" 
    if multikey(SC_PAGEDOWN) or multikey(SC_h) then ux += 1:uy+=1:p=1:g="H" 
    if multikey(SC_END) or multikey(SC_f)      then ux -= 1:uy+=1:p=1:g="F"    
    if multikey(SC_HOME) or multikey(SC_e)     then ux -= 1:uy-=1:p=1:g="E"
    
    if ux < 1 then ux = 1 :outside=1
    if ux > 9 then ux = 9 :outside=1
    if uy < 1 then uy = 1 :outside=1
    if uy > 9 then uy = 9 :outside=1
    
    if (p=1 and outside=0) then showsmall 
    p=0:outside=0
    
    if c3 > 6 then c3 = 1
    
    ' clear
    if multikey(SC_C) or multikey(SC_c)then 
      for x = 0 to 8
	    for y = 0 to 8
	      with small(x+1,y+1)
	        .aktiv = 0
	        line(.x,.y) - step (18,18),15,bf
	      end with
	    next y
	  next x 
	  smallglyph = ""
	  showsmall
	  visible=0:ux=5:uy=5
    end if
    
    ' take into array
    if multikey(SC_t) or multikey(SC_T) then
	  glyph(nr+0) = smallglyph
      imagedestroy(buffer(nr+0))                ' clear
	  buffer(nr+0) = imagecreate(9, 9, 2)
	  color 15,2
	  draw buffer(nr+0), "bm4,4" & glyph(nr+0) ' set cursor to center and add glyph
	  put (14 + 20 * (nr), 10), buffer(nr+0), pset  
	  color c3,15  
    end if
    
    ' visible
    if multikey(SC_v) or multikey(SC_v)then 
      if visible = 1 then 
        visible = 0 
        draw string (10, 10), "visible",0
      else
        visible = 1
        draw string (10, 10), "visible",15
      end if
    end if
    
    ' draw small box
    with small(ux,uy)
    if visible = 1 then 
	  .aktiv = 1
	  if .aktiv = 1 then
	    line(.x,.y) - step (18,18),c3,bf
	    
	  'else
	    'line(.x,.y) - step (18,18),1,bf
	    
	  end if  
    else
	  if .aktiv = 0 then
	      line(.x,.y) - step (18,18),14,bf,00010001
	     
	  else
	      line(.x,.y) - step (18,18),c3,bf
	     
	  end if 
	end if
    end with
    showsmall
  loop until multikey(SC_tab)  'inkey = chr(13) ' until enter pressed

end sub

ox=325
oy=190

sub showsmall                            ' make glyph-string
  color 0,0
    if visible = 0 then                  ' invisible?
    
      if left(gold,1) = "B" then
        if mid(gold,2,1) = g then        ' same direction
          if len(gold) = 4 then
            zahl=val(right(gold,2))      ' old number 2 digit
          elseif len(gold) = 3 then
            zahl=val(right(gold,1))      ' old number 1 digit 
          else
            zahl=1                       ' old number 0 digit
          end if
          smallglyph = rtrim (smallglyph,gold)
          gold = "B" & g & str(zahl+1)  
          if gold = "B0" then gold = ""                   
          smallglyph += gold               ' new bigglyph
        else                             ' another direction)
          gold = "B" & g 
          smallglyph += gold               ' new bigglyph
        end if
      else                               ' invisible, no B
        gold = "B" & g                
        smallglyph += gold                 ' new bigglyph      
      end if  
     
    else                                 ' visible
   
      if left(gold,1) = "B" then         ' previous B
        gold = g                         ' new direction
        smallglyph += gold                 ' new bigglyph                                    
      else                               ' visible
        if mid(gold,1,1) = g then        ' same direction
          if len(gold) = 3 then
            zahl=val(right(gold,2))
          elseif len(gold) = 2 then 
            zahl=val(right(gold,1))
          else
            zahl=1
          end if
          smallglyph = rtrim (smallglyph,gold)
          gold = g & str(zahl+1)
          smallglyph += gold               ' new bigglyph
        else                             ' new direction 
          gold = g
          smallglyph += gold               ' new bigglyph
        end if
      end if  
      
    end if ' make glyph-string
  line(10,80) - step (1094,14),15,bf ' erase backgrund
  draw string (14,84), smallglyph ' draw small glyph-string
end sub
 
 gold = "B00"
 bigglyph=""
 
sub showbig
  color 0,0
  
  ' make glyph-string
    if visible = 0 then                  ' invisible?
    
      if left(gold,1) = "B" then
        if mid(gold,2,1) = g then        ' same direction
          if len(gold) = 4 then
            zahl=val(right(gold,2))      ' old number 2 digit
          elseif len(gold) = 3 then
            zahl=val(right(gold,1))      ' old number 1 digit 
          else
            zahl=1                       ' old number 0 digit
          end if
          bigglyph = rtrim (bigglyph,gold)
          gold = "B" & g & str(zahl+1)  
          if gold = "B0" then gold = ""                   
          bigglyph += gold               ' new bigglyph
        else                             ' another direction)
          gold = "B" & g 
          bigglyph += gold               ' new bigglyph
        end if
      else                               ' invisible, no B
        gold = "B" & g                
        bigglyph += gold                 ' new bigglyph      
      end if  
     
    else                                 ' visible
   
      if left(gold,1) = "B" then         ' previous B
       ' bigglyph = rtrim (bigglyph,gold)
        gold = g                         ' new direction
        bigglyph += gold                 ' new bigglyph                                    
      else                               ' visible
        if mid(gold,1,1) = g then        ' same direction
          if len(gold) = 3 then
            zahl=val(right(gold,2))
          elseif len(gold) = 2 then 
            zahl=val(right(gold,1))
          else
            zahl=1
          end if
          bigglyph = rtrim (bigglyph,gold)
          gold = g & str(zahl+1)
          bigglyph += gold               ' new bigglyph
        else                             ' new direction 
          'trim (bigglyph,gold) 
          gold = g
          bigglyph += gold               ' new bigglyph
        end if
      end if  
      
    end if ' make glyph-string
    
  line(10,852) - step (1094,14),15,bf ' erase background
  draw string (14,856), bigglyph ' draw big glyph-string
end sub

sub editor

  smallglyph = ""
  bigglyph = ""

	for x = 0 to 8
	  for y = 0 to 8
	    if point(x,y,buffer(nr)) = 15 then 
	      small(x+1,y+1).aktiv = 1
	    else
	      small(x+1,y+1).aktiv = 0
	    end if
	  next y
	next x 
	
	for x = 0 to 16
	  for y = 0 to 16
	    if point(x,y,buffer(nr+55)) = 15 then 
	      big(x+1,y+1).aktiv =1
	    else
	      big(x+1,y+1).aktiv = 0
	    end if  
	  next y
	next x  		    

ox=90
oy=10

for sx = 1 to 9
  for sy = 1 to 9
    with small(sx,sy)
    if .aktiv = 1 then
      line(.x,.y) - step (18,18),1,bf
    else
     line(.x,.y) - step (18,18),15,bf
    end if
    end with
  next sy
next sx

ox=10
oy+=210

for sx = 1 to 17
  for sy = 1 to 17
    with big(sx,sy)
    if .aktiv = 1 then
      line(.x,.y) - step (18,18),1,bf
    else
      line(.x,.y) - step (18,18),15,bf
    end if
    end with
  next sy
next sx

draw string (215,170-16), "visible",0
draw string (315,170-16), "nomove",0
draw string (715,170-16), "smallglyph",0:draw string (715,170-16), "bigglyph",15
'nr=0
visible=0
nomove=0
lx=9
ly=9
c1=1
c2=1
c3=1

  do
    sleep speed ' adjust speed here if needed 
    
    ' clear
    if multikey(SC_c) or multikey(SC_C)   then 
      for x = 0 to 16
	    for y = 0 to 16
	      with big(x+1,y+1)
	       .aktiv = 0
	       line(.x,.y) - step (18,18),15,bf
	       end with
	    next y
	  next x
	  visible = 0: draw string (215,170-16), "visible",0
	  lx=9:ly=9
	  bigglyph = "" 
	  gold="B00"
	  g=""
	  line(10,852) - step (1094,14),15,bf ' erase background
	  'showbig
    end if
    
    ' upper
    if multikey(SC_TAB) then draw string (715,170-16), "bigglyph",0:draw string (715,170-16), "smallglyph",15:upper
    
    ' visible
    if multikey(SC_v) or multikey(SC_V)then 
      if visible = 0 then 
        visible = 1 
        draw string (215,170-16), "visible",15
      else
        visible = 0
        draw string (215,170-16), "visible",0
      end if
    end if
    
    ' nomove
    if multikey(SC_n) or multikey(SC_N)then 
      if nomove = 0 then 
        nomove = 1
        draw string (315,170-16), "nomove",15
      else
        nomove = 0
        draw string (315,170-16), "nomove",0
      end if
    end if
    
    ' color
    if multikey(SC_3) then c3+=1 ' color 3
    
    ' take into array
    if multikey(SC_t) or multikey(SC_T) then
	  glyph(nr+55) = bigglyph
      imagedestroy(buffer(nr+55))                ' clear
	  buffer(nr+55) = imagecreate(17, 17, 2)
	  color 15,2
	  draw buffer(nr+55), "bm8,8" & glyph(nr+55) ' set cursor to center and add glyph
	  put (10 + 20 * (nr), 30), buffer(nr+55), pset  
	  color c3,15  
    end if
       
    ' cursor (numpad)
    if multikey(SC_CONTROL)and (multikey(SC_c) or multikey(SC_C)) then end ' hot seat
    if multikey(SC_PAGEUP)   or multikey(SC_g) then lx+=1:ly-=1:p=1:g="G" 
    if multikey(SC_PAGEDOWN) or multikey(SC_h) then lx+=1:ly+=1:p=1:g="H" 
    if multikey(SC_END)      or multikey(SC_f) then lx-=1:ly+=1:p=1:g="F"    
    if multikey(SC_HOME)     or multikey(SC_e) then lx-=1:ly-=1:p=1:g="E"    
    if multikey(SC_LEFT)                       then lx-=1      :p=1:g="L" 
    if multikey(SC_RIGHT)                      then lx+=1      :p=1:g="R" 
    if multikey(SC_UP)                         then ly-=1      :p=1:g="U" 
    if multikey(SC_DOWN)                       then ly+=1      :p=1:g="D" 
   
    if lx < 1  then lx=1 :outside=1
    if lx > 17 then lx=17:outside=1
    if ly < 1  then ly=1 :outside=1
    if ly > 17 then ly=17:outside=1
    
    if (p=1 and outside=0) then showbig
    p=0:outside=0
    
    if c3 > 6 then c3 = 1
    
    with big(lx,ly)
    if visible = 1 then 
	  .aktiv = 1
	 ' if .aktiv = 1 then
	    line(.x,.y) - step (18,18),c3,bf
	  'else
	    'line(.x,.y) - step (18,18),1,bf
	  'end if  
    else
	  if .aktiv = 0 then
	      line(.x,.y) - step (18,18),14,bf 
	  else
	      line(.x,.y) - step (18,18),7,bf 'light grey
	  end if 
	end if
    end with
    
  loop until multikey(SC_ENTER) 'until "enter" pressed
end sub

sub moverect
  if nr > 54 then nr = 0
  if nr < 0 then nr = 54
  line(9+20*onr,6) - step (19,44),0,b   ' erase last frame
  line(9+20*nr,6) - step (19,44),12,b   ' glyph red frame
  line(50,120+13*onr) - step (86,8),0,b ' erase last frame
  line(50,120+13*nr) - step (86,8),12,b ' name red frame
  onr=nr
end sub

dim as event ptr event
event = allocate(20)

' mainloop
showglyphs
do
  sleep speed ' adjust speed here if needed
  if multikey(SC_CONTROL)and (multikey(SC_c) or multikey(SC_C)) then end ' hot seat
  if multikey(SC_LEFT)  or multikey(SC_UP)   then nr-=1 
  if multikey(SC_RIGHT) or multikey(SC_DOWN) then nr+=1
  if multikey(SC_L)     or multikey(SC_l)    then loadglyphs
  if multikey(SC_S)     or multikey(SC_s)    then saveglyphs
  if multikey(SC_W)     or multikey(SC_w)    then writeswitch
  if multikey(SC_ENTER)                      then editor
  moverect 
loop until multikey(SC_ESCAPE) ' until esc pressed

for i = 0 to 109
  imagedestroy buffer(i)
next i

end ' Glyph-String Editor
Problems are in the subs "showsmall" and "showbig". I believe i have taken a completely false approach there. Who can do better?
lizard
Posts: 440
Joined: Oct 17, 2017 11:35
Location: Germany

Re: Astrolog, glyph redefinition and turtle graphics

Post by lizard »

Thanks, BasicCoder2 tor the editor you gave me here:

viewtopic.php?f=7&t=26454&p=243879#p243879

You and Pullen are using the same "draw sublanguage", but in another way. I made a glyph for Saturn with your Editor, but in another size:

Code: Select all

"BM-57,-135M+1,+190BM-34,-161M+68,+0BM-28,+66M+29,-1M+41,-1M+12,+17M+1,+33M+0,+24M+2,+26M+7,+17M+13,+1M+9,-3M+4,-7"
Pullen:

Code: Select all

"BH3R2NUNR2D4ND2E2RFDGDF"     
You are using absolute coordinates ("M") while Pullen uses relative ones.

The fun goes on. :-)
BasicCoder2
Posts: 3906
Joined: Jan 01, 2009 7:03
Location: Australia

Re: Astrolog, glyph redefinition and turtle graphics

Post by BasicCoder2 »

lizard wrote:
Thanks, BasicCoder2 tor the editor you gave me here:
viewtopic.php?f=7&t=26454&p=243879#p243879
You are using absolute coordinates ("M") while Pullen uses relative ones.
I thought mine was relative that is why you can rotate it?
It has been a long time since playing with DRAW strings. I remember writing an absolute to relative converter for such strings.
I found the DRAW command too limiting thus wrote my own macro language which added things like line thickness.
lizard
Posts: 440
Joined: Oct 17, 2017 11:35
Location: Germany

Re: Astrolog, glyph redefinition and turtle graphics

Post by lizard »

BasicCoder2 wrote: I thought mine was relative that is why you can rotate it?
Right, i made a mistake. With the "-" and "+" it means these values become added. So there are three systems for the coordinates.

With "M" you specify x and y separated by comma. This is possible absolute and relative (with "+" and "-"). For the second relative you only need direction and number of steps like "L5" for left five steps.

Limited, yes, somehow. Graphics made with it sometimes look oldfashioned. I believe this is because it is complicated to create the strings. If you look at Astrolog, Venus and Mercury are already good, but Jupiter and Saturn could be made better.

Sometimes i think it's maybe not worth the effort to invest much time in DRAW. Because with .png files it is all much quicker made. But my feeling says, this system has potential that was seldom used before. With a good editor it must be possible to get good results. At the end we have the fastest graphics ever.
lizard
Posts: 440
Joined: Oct 17, 2017 11:35
Location: Germany

Re: Astrolog, glyph redefinition and turtle graphics

Post by lizard »

This is a test of glyph-strings:

Code: Select all

' glyph_string_test.bas

#include "fbgfx.bi"
using fb

screenres 1115, 888, 24 ' three byte colors (without transparency)
windowtitle "Glyph-String test"

dim as string glyph(23), cursor
dim as integer i,x

' some big glyph-strings in no special order
glyph(00)="U0BU8L2GLG3DGD4FDF3RFR4ERE3UEU4HUH3LHL2"                ' Sun  
glyph(01)="ND8NL8NR8U8L2GLG3DGD4FDF3RFR4ERE3UEU4HUH3LHL2"          ' Earth
glyph(02)="G2DG2DG2R12H2UH2UH2U8NG4F4"                             ' Vulcanus       
glyph(03)="BELHL4G3D4F3R4E3U4HUE7ND5L5"                            ' Mars      
glyph(04)="BD4LGD2FR2EU2HLU6NU2NR4L4NU4D2G2BU10NF2BR12G2D6F2"      ' Uranus #1  
glyph(05)="BD8U4NL4NR4U10NU2NR2L2BL3LNU2NLD2FDFRFR4EREUEU2NLNRU2"  ' Neptune    
glyph(06)="D4NL4NR4D4BU16LGD2FR2EU2HLBL6D4FDFRFR4EREUEU4"          ' Pluto  #1  
glyph(07)="BG4LGD2FR2EU2HLU7RF2RF2RFBU10GLG2LG2BLU5"               ' Chiron         
glyph(08)="BD8U2NL6NR6U4R3E3U4H3L4G2"                              ' Ceres          
glyph(09)="BD8U2NL6NR6U2E4HUHUHUHNUGDGDGDGF4"                      ' Pallas
glyph(10)="BD8U2NL4NR4U8NL7NR7NE5NF5NG5NH5U6"                      ' Juno           
glyph(11)="BU8D3BG5NL3DF2DF2DFEUE2UE2UR3BH4GDG2DGHUH2UH"           ' Vesta          
glyph(12)="BG4BDHL2GD2FR2EU5H2U4E4R4F4D4G2D5FR2EU2HL2G"            ' North Node     
glyph(13)="BH4BUGL2HU2ER2FD5G2D4F4R4E4U4H2U5ER2FD2GL2H"            ' South Node     
glyph(14)="BD8U7HU3HU2H2L2G2D2F2BR12E2U2H2L2G2D2GD3G"                            ' Aries   
glyph(15)="BH6BU2FDFRFNR4GLGDGD4FDFRFR4EREUEU4HUHLHEREUE"                        ' Taurus  
glyph(16)="BL2U6LHLHBR14GLGLNL6D12NL6RFRFBL14ERERU6"                             ' Gemini  
glyph(17)="BF5NLRE2U2H2L2G2D2F2G2L4HL2H3BE6NH2D2G2L2H2U2E2R2E2R4FR2F3"           ' Cancer  
glyph(18)="BF8H4U2E2U4HUHLHL4GLGDGD4FDFD2GL2HU"                                  ' Leo    
glyph(19)="BF8BL2H3UHU5E4D9GDG3BU10U4H2G2ND12H2G2ND12H2"                         ' Virgo  
glyph(20)="BH8F2ND12E2F2ND12E2F2D12F2RE2U3NGF"                                   ' Scorpio 
glyph(21)="NL8NR8BH8F3DFD6GDG3BR16H3UHU6EUE3"                                    ' Pisces 
glyph(22)="BH6BL2E2D4FD4FND4EU2EUEU2EUF2ND2E2R2F2D2G2L2NH2F4D4G2"                ' Capricorn #1
glyph(23)="BG8EUE2UEDFD2FDEUE2UEDFD2FDEUE2UEBU10GDG2DGUHU2HUGDG2DGUHU2HUGDG2DG"  ' Aquarius  

color &HFFFFFF, &H000000 ' white on black

' show some big glyphs moving from left to right
do   
  for i = 0 to 23
    for x = 0 to 1100
      cursor = "bm" & str(x) & "," & str((i+1)*20)
      color &HFFFFFF ' white on black
      draw  cursor & glyph(i) ' set cursor, add glyph and draw
      sleep 0.6 ' adjust speed here for your machine
      if multikey(SC_ESCAPE) then end
      color &H000000 ' black on black (erase previous)
      draw  cursor & glyph(i) ' set cursor, add glyph and draw
    next x
  next i  
loop until multikey(SC_ESCAPE) ' until esc pressed

end
Who can do faster, but without flickering?
grindstone
Posts: 862
Joined: May 05, 2015 5:35
Location: Germany

Re: Astrolog, glyph redefinition and turtle graphics

Post by grindstone »

Not faster, but without flickering:

Code: Select all

' glyph_string_test.bas

#Include "fbgfx.bi"
Using fb

ScreenRes 1115, 888, 24, 2 ' three byte colors (without transparency) '<<<<<<<<<<<<<<<
ScreenSet 1,0 '<<<<<<<<<<<<<<<
WindowTitle "Glyph-String test"

Dim As String glyph(23), cursor
Dim As Integer i,x

' some big glyph-strings in no special order
glyph(00)="U0BU8L2GLG3DGD4FDF3RFR4ERE3UEU4HUH3LHL2"                ' Sun 
glyph(01)="ND8NL8NR8U8L2GLG3DGD4FDF3RFR4ERE3UEU4HUH3LHL2"          ' Earth
glyph(02)="G2DG2DG2R12H2UH2UH2U8NG4F4"                             ' Vulcanus       
glyph(03)="BELHL4G3D4F3R4E3U4HUE7ND5L5"                            ' Mars     
glyph(04)="BD4LGD2FR2EU2HLU6NU2NR4L4NU4D2G2BU10NF2BR12G2D6F2"      ' Uranus #1 
glyph(05)="BD8U4NL4NR4U10NU2NR2L2BL3LNU2NLD2FDFRFR4EREUEU2NLNRU2"  ' Neptune   
glyph(06)="D4NL4NR4D4BU16LGD2FR2EU2HLBL6D4FDFRFR4EREUEU4"          ' Pluto  #1 
glyph(07)="BG4LGD2FR2EU2HLU7RF2RF2RFBU10GLG2LG2BLU5"               ' Chiron         
glyph(08)="BD8U2NL6NR6U4R3E3U4H3L4G2"                              ' Ceres         
glyph(09)="BD8U2NL6NR6U2E4HUHUHUHNUGDGDGDGF4"                      ' Pallas
glyph(10)="BD8U2NL4NR4U8NL7NR7NE5NF5NG5NH5U6"                      ' Juno           
glyph(11)="BU8D3BG5NL3DF2DF2DFEUE2UE2UR3BH4GDG2DGHUH2UH"           ' Vesta         
glyph(12)="BG4BDHL2GD2FR2EU5H2U4E4R4F4D4G2D5FR2EU2HL2G"            ' North Node     
glyph(13)="BH4BUGL2HU2ER2FD5G2D4F4R4E4U4H2U5ER2FD2GL2H"            ' South Node     
glyph(14)="BD8U7HU3HU2H2L2G2D2F2BR12E2U2H2L2G2D2GD3G"                            ' Aries   
glyph(15)="BH6BU2FDFRFNR4GLGDGD4FDFRFR4EREUEU4HUHLHEREUE"                        ' Taurus 
glyph(16)="BL2U6LHLHBR14GLGLNL6D12NL6RFRFBL14ERERU6"                             ' Gemini 
glyph(17)="BF5NLRE2U2H2L2G2D2F2G2L4HL2H3BE6NH2D2G2L2H2U2E2R2E2R4FR2F3"           ' Cancer 
glyph(18)="BF8H4U2E2U4HUHLHL4GLGDGD4FDFD2GL2HU"                                  ' Leo   
glyph(19)="BF8BL2H3UHU5E4D9GDG3BU10U4H2G2ND12H2G2ND12H2"                         ' Virgo 
glyph(20)="BH8F2ND12E2F2ND12E2F2D12F2RE2U3NGF"                                   ' Scorpio
glyph(21)="NL8NR8BH8F3DFD6GDG3BR16H3UHU6EUE3"                                    ' Pisces
glyph(22)="BH6BL2E2D4FD4FND4EU2EUEU2EUF2ND2E2R2F2D2G2L2NH2F4D4G2"                ' Capricorn #1
glyph(23)="BG8EUE2UEDFD2FDEUE2UEDFD2FDEUE2UEBU10GDG2DGUHU2HUGDG2DGUHU2HUGDG2DG"  ' Aquarius 

Color &HFFFFFF, &H000000 ' white on black

' show some big glyphs moving from left to right
Do   
  For i = 0 To 23
    For x = 0 To 1100
      cursor = "bm" & Str(x) & "," & Str((i+1)*20)
      Color &HFFFFFF ' white on black
      Draw  cursor & glyph(i) ' set cursor, add glyph and draw
      ScreenCopy '<<<<<<<<<<<<<<<
      Sleep 0.6 ' adjust speed here for your machine
      If MultiKey(SC_ESCAPE) Then End
      Color &H000000 ' black on black (erase previous)
      Draw  cursor & glyph(i) ' set cursor, add glyph and draw
    Next x
  Next i 
Loop Until MultiKey(SC_ESCAPE) ' until esc pressed

End
Post Reply