Graphisme du Zodiaque
Publié : mar. 20/mai/2008 12:32
bonjour
petit essai graphique qui va permettre de trace un theme avec les ephemeride suisse
petit essai graphique qui va permettre de trace un theme avec les ephemeride suisse
Code : Tout sélectionner
;###################################################################
;### graphisme du Zodiaque avec police astro ###
;### police astro a copier dans le dossier "c:\windows\fonts" ###
;### ICI --> http://home.att.net/~ag2kh/download.htm ###
;### par kernadec pb4 OS windows 05 2008 ###
;###################################################################
;###################################################################
Global pos.d,x,y,xx,yy,axex,axey,rayon,tfont,mpos,rmaison
Declare astre(pos)
Declare planete()
Declare tracemaison(mpos)
Declare maison(mpos)
wlargeur=600
whauteur=600
axex = 300
axey = 280
rayon = 130
rmaison=rayon/1.5
tfont=26
;####################################################################
; ya plus qu'a faire dessiner l'imprimante lolllll
;####################################################################
font1=LoadFont(1,"astro",tfont,#PB_Font_Bold)
If OpenWindow(0, 0, 0, wlargeur, whauteur, "Graphisme Simple du ZODIAQUE par Kernadec", #WS_SYSMENU)
StartDrawing(WindowOutput(0))
DrawingFont(font1)
FillArea(0 ,0 ,RGB(70,70,70),RGB(70,70,70))
DrawingMode(1)
FrontColor(RGB(255, 255, 255))
For o = 0 To 359 Step 30
x = axex + rayon * Sin(o / 180 * #PI)
y = axey + rayon * Cos(o / 180 * #PI)
xx = axex + (rayon + rayon/2.5) * Sin(o / 180 * #PI)
yy = axey + (rayon + rayon/2.5) * Cos(o / 180 * #PI)
LineXY(x, y , xx, yy,RGB(255, 255, 255))
For i = 1 To 29
If i = 5 Or i = 15 Or i = 25
x = axex + rayon * Sin((i + o) / 180 * #PI)
y = axey + rayon * Cos((i + o) / 180 * #PI)
xx = axex + (rayon + rayon/12.5) * Sin((i + o) / 180 * #PI)
yy = axey + (rayon + rayon/12.5) * Cos((i + o) / 180 * #PI)
LineXY(x, y , xx, yy, RGB(255, 255, 255))
ElseIf i = 10 Or i = 20
x = axex + rayon * Sin((i + o) / 180 * #PI)
y = axey + rayon * Cos((i + o) / 180 * #PI)
xx = axex + (rayon + rayon/8) * Sin((i + o) / 180 * #PI)
yy = axey + (rayon + rayon/8) * Cos((i + o) / 180 * #PI)
LineXY(x, y , xx, yy,RGB(255, 255, 255))
Else
x = axex + rayon * Sin((i + o) / 180 * #PI)
y = axey + rayon * Cos((i + o) / 180 * #PI)
xx = axex + (rayon + rayon/20) * Sin((i + o) / 180 * #PI)
yy = axey + (rayon + rayon/20) * Cos((i + o) / 180 * #PI)
LineXY(x, y , xx, yy, RGB(255, 255,0));
EndIf
Next i
x = (axex-tfont/2) + (rayon + rayon/4.35) * Sin((o+15) / 180 * #PI)
y = (axey-tfont/2) + (rayon + rayon/4.35) * Cos((o+15) / 180 * #PI)
xx = (axex-tfont/2.25) + (rayon + rayon/4.35) * Sin((o+15) / 180 * #PI)
yy = (axey-tfont/2.25) + (rayon + rayon/4.35) * Cos((o+15) / 180 * #PI)
DrawText(xx,yy,Chr(c+65),RGB(255, 255, 255))
DrawText(x,y,Chr(c+65),RGB(Random(255), Random(255), Random(255)))
c=c+1
planete()
maison(o)
tracemaison(o)
Next o
DrawingMode(4)
Ellipse(axex ,axey, rayon + rayon/2.5, rayon + rayon/2.5, RGB(255, 255, 255))
Ellipse(axex, axey, rayon, rayon, RGB(255, 255, 255))
StopDrawing()
EndIf
Repeat
EventID = WaitWindowEvent()
Until EventID = #PB_Event_CloseWindow
End
;###################################################################
Procedure maison(mpos)
If mpos=180
x = (axex-tfont/2) + (rayon + rayon/2.5 + rmaison) * Sin(mpos/ 180 * #PI)
y = (axey-tfont/2) + (rayon + rayon/2.5 + rmaison) * Cos(mpos / 180 * #PI)
xx = (axex-tfont/2.25) + (rayon + rayon/2.5 + rmaison) * Sin(mpos/ 180 * #PI)
yy = (axey-tfont/2.25) + (rayon + rayon/2.5 + rmaison) * Cos(mpos / 180 * #PI)
DrawText(xx,yy,Chr(98),RGB(255, 255, 255))
DrawText(x,y,Chr(98),RGB(Random(255), Random(255), Random(255)))
EndIf
If mpos=270
x = (axex-tfont/2) + (rayon + rayon/2.5 + rmaison) * Sin(mpos/ 180 * #PI)
y = (axey-tfont/2) + (rayon + rayon/2.5 + rmaison) * Cos(mpos / 180 * #PI)
xx = (axex-tfont/2.25) + (rayon + rayon/2.5 + rmaison) * Sin(mpos / 180 * #PI)
yy = (axey-tfont/2.25) + (rayon + rayon/2.5 + rmaison) * Cos(mpos/ 180 * #PI)
DrawText(xx,yy,Chr(97),RGB(255, 255, 255))
DrawText(x,y,Chr(97),RGB(Random(255), Random(255), Random(255)))
EndIf
EndProcedure
Procedure tracemaison(mpos)
x = axex + (rayon + rayon/2.5) * Sin(mpos / 180 * #PI)
y = axey + (rayon + rayon/2.5) * Cos(mpos / 180 * #PI)
xx = axex + (rayon + rayon/2.5 + rmaison) * Sin(mpos/ 180 * #PI)
yy = axey + (rayon + rayon/2.5 + rmaison) * Cos(mpos / 180 * #PI)
LineXY(x, y , xx, yy,RGB(255, 255, 0))
EndProcedure
Procedure astre(pos)
x = (axex-tfont/2) + (rayon + rayon/1.8) * Sin(pos / 180 * #PI)
y = (axey-tfont/2) + (rayon + rayon/1.8) * Cos(pos / 180 * #PI)
xx = (axex-tfont/2.25) + (rayon + rayon/1.8) * Sin(pos / 180 * #PI)
yy = (axey-tfont/2.25) + (rayon + rayon/1.8) * Cos(pos / 180 * #PI)
EndProcedure
Procedure planete()
;################################################################
;# definition des maitises retro et directe de chaque signe #
;################################################################
; ############### Soleil Maitre Diurne
astre(130)
DrawText(xx,yy,Chr(81),RGB(255, 255, 255))
DrawText(x,y,Chr(81),RGB(255, 255,0))
; ############### Soleil Maitre Nocturne
astre(110)
DrawText(xx,yy,Chr(81),RGB(255, 255, 255))
DrawText(x,y,Chr(81),RGB(255, 255,0))
; ############### lune Maitre Diurne
astre(100)
DrawText(xx,yy,Chr(82),RGB(255, 255, 255))
DrawText(x,y,Chr(82),RGB(200, 200,200))
; ############### lune Maitre Nocturne
astre(140)
DrawText(xx,yy,Chr(82),RGB(255, 255, 255))
DrawText(x,y,Chr(82),RGB(Random(255), Random(255), Random(255)))
; ############### mercure Maitre Diurne
astre(70)
DrawText(xx,yy,Chr(83),RGB(255, 255, 255))
DrawText(x,y,Chr(83),RGB(Random(255), Random(255), Random(255)))
; ############### mercure Maitre Nocturne
astre(80)
DrawText(xx,yy,Chr(83),RGB(255, 255, 255))
DrawText(x,y,Chr(83),RGB(Random(255), Random(255), Random(255)))
; ############### venus Maitre Diurne
astre(40)
DrawText(xx,yy,Chr(84),RGB(255, 255, 255))
DrawText(x,y,Chr(84),RGB(Random(255), Random(255), Random(255)))
; ############### venus Maitre Nocturne
astre(50)
DrawText(xx,yy,Chr(84),RGB(255, 255, 255))
DrawText(x,y,Chr(84),RGB(Random(255), Random(255), Random(255)))
; ############### mars Maitre Diurne
astre(10)
DrawText(xx,yy,Chr(85),RGB(255, 255, 255))
DrawText(x,y,Chr(85),RGB(Random(255), Random(255), Random(255)))
; ############### pluton Maitre Nocturne
astre(20)
DrawText(xx,yy,Chr(90),RGB(255, 255, 255))
DrawText(x,y,Chr(90),RGB(Random(255), Random(255), Random(255)))
; ############### jupiter Maitre Diurne
astre(250)
DrawText(xx,yy,Chr(86),RGB(255, 255, 255))
DrawText(x,y,Chr(86),RGB(Random(255), Random(255), Random(255)))
; ############### neptune Maitre Nocturne
astre(260)
DrawText(xx,yy,Chr(89),RGB(255, 255, 255))
DrawText(x,y,Chr(89),RGB(Random(255), Random(255), Random(255)))
; ############### saturne Maitre Diurne
astre(280)
DrawText(xx,yy,Chr(87),RGB(255, 255, 255))
DrawText(x,y,Chr(87),RGB(Random(255), Random(255), Random(255)))
; ############### saturne Maitre Nocturne
astre(290)
DrawText(xx,yy,Chr(87),RGB(255, 255, 255))
DrawText(x,y,Chr(87),RGB(Random(255), Random(255), Random(255)))
; ############### uranus Maitre Diurne
astre(310)
DrawText(xx,yy,Chr(88),RGB(255, 255, 255))
DrawText(x,y,Chr(88),RGB(Random(255), Random(255), Random(255)))
; ############### uranus Maitre Nocturne
astre(320)
DrawText(xx,yy,Chr(88),RGB(255, 255, 255))
DrawText(x,y,Chr(88),RGB(Random(255), Random(255), Random(255)))
; ############### neptune Maitre Diurne
astre(340)
DrawText(xx,yy,Chr(89),RGB(255, 255, 255))
DrawText(x,y,Chr(89),RGB(Random(255), Random(255), Random(255)))
; ############### jupiter Maitre Nocturne
astre(350)
DrawText(xx,yy,Chr(86),RGB(255, 255, 255))
DrawText(x,y,Chr(86),RGB(Random(255), Random(255), Random(255)))
; ############### pluton Maitre Diurne
astre(220)
DrawText(xx,yy,Chr(90),RGB(255, 255, 255))
DrawText(x,y,Chr(90),RGB(Random(255), Random(255), Random(255)))
; ############### mars Maitre Nocturne
astre(230)
DrawText(xx,yy,Chr(85),RGB(255, 255, 255))
DrawText(x,y,Chr(85),RGB(Random(255), Random(255), Random(255)))
; ############### mercure Maitre Diurne
astre(160)
DrawText(xx,yy,Chr(83),RGB(255, 255, 255))
DrawText(x,y,Chr(83),RGB(Random(255), Random(255), Random(255)))
; ############### mercure Maitre Nocturne
astre(170)
DrawText(xx,yy,Chr(83),RGB(255, 255, 255))
DrawText(x,y,Chr(83),RGB(Random(255), Random(255), Random(255)))
; ############### venus Maitre Diurne
astre(190)
DrawText(xx,yy,Chr(84),RGB(255, 255, 255))
DrawText(x,y,Chr(84),RGB(Random(255), Random(255), Random(255)))
; ############### venus Maitre Nocturne
astre(200)
DrawText(xx,yy,Chr(84),RGB(255, 255, 255))
DrawText(x,y,Chr(84),RGB(Random(255), Random(255), Random(255)))
EndProcedure