Hello World
Ici on trouve de l'actu, des essais sur les technos de l'information, de l'étrange et pas mal de bazard...
Ce blog véhicule des images, quelques videos, des sons, du code et des outils.
Bon surf.
Ici on trouve de l'actu, des essais sur les technos de l'information, de l'étrange et pas mal de bazard...
Ce blog véhicule des images, quelques videos, des sons, du code et des outils.
Bon surf.
;Pluto Kiss
;Franck Balmer
;Janvier 2007
SizeOfSpace%=4096*1024
Dim IntegerArray%(SizeOfSpace%)
;Definition cube 4Mo
xxmax=32
yymax=32
zzmax=1024
;Constantes
SpScale#=1
GreenSeed%=67
;Lecture du fichier de Patterns
PatternFileName$=Input$(">Pattern File: ")
PatternFile=OpenFile(PatternFileName$)
Pattern1%=ReadByte(PatternFile)
Pattern2%=ReadByte(PatternFile)
Pattern3%=ReadByte(PatternFile)
Pattern4%=ReadByte(PatternFile)
Pattern5%=ReadByte(PatternFile)
Pattern6%=ReadByte(PatternFile)
Pattern7%=ReadByte(PatternFile)
Pattern8%=ReadByte(PatternFile)
CloseFile (PatternFile)
;Ouverture du fichier
RawFileName$=Input$("File Name: ")
;On test si on peut faire du fenetré
If Windowed3D()
Graphics3D 800,600,0,2
Else
Graphics3D 800,600,0,1
EndIf
;Ouverture du Fichier Datas
RawFile=OpenFile(RawFileName$)
;Initialisation de la scene
SetBuffer BackBuffer()
xcam#=0
ycam#=30
zcam#=-250
cam=CreateCamera()
;PositionEntity cam,0,30,-150
PositionEntity cam,xcam#,ycam#,zcam#
light=CreateLight()
TurnEntity light,45,45,0
light2=CreateLight()
TurnEntity light2,45,0,45
xx=0
yy=0
zz=0
;creation du pivot
trinity=CreatePivot()
;Creation du Cube Frontiere si Bytes
Rcube=CreateCube(trinity)
ScaleEntity Rcube,xxmax,yymax,zzmax
EntityColor Rcube,20,0,20
EntityAlpha Rcube,0.2
;Creation Cube Initial
Spcell=CreateCube (trinity)
ScaleEntity Spcell,SpScale#,SpScale#,SpScale#
EntityAlpha Spcell,0.5
EntityColor Spcell,67,GreenSeed%,200
EntityShininess Spcell,0.5
PositionEntity Spcell,xx,yy,zz
HideEntity Spcell
;On parcoure le fichier
;Chargement du tableau d'entiers
IntNum=0
While Not Eof(RawFile)
CurrentInt%=ReadByte(RawFile)
Intnum=Intnum+1
IntegerArray%(Intnum)=CurrentInt%
Wend ;Du parcour de fichier
;On ferme le fichier
CloseFile (RawFile)
;On Visualise
xx=0
yy=0
zz=0
Intnumber=Intnum
For k=0 To Intnumber
If (xx=xxmax) Then
xx=0
yy=yy+1
End If
If (yy=yymax) Then
yy=0
zz=zz+1
End If
If (zz=zzmax) Then
Exit
End If
pfound=0
If (IntegerArray%(k)=Pattern1%) Then
red%=0
green%=0
blue%=255
pfound=1
End If
If (IntegerArray%(k)=Pattern2%) Then
red%=255
green%=0
blue%=0
pfound=1
End If
If (IntegerArray%(k)=Pattern3%) Then
red%=0
green%=255
blue%=0
pfound=1
End If
If (IntegerArray%(k)=Pattern4%) Then
red%=255
green%=128
blue%=0
pfound=1
End If
If (IntegerArray%(k)=Pattern5%) Then
red%=255
green%=255
blue%=0
pfound=1
End If
If (IntegerArray%(k)=Pattern6%) Then
red%=128
green%=255
blue%=0
pfound=1
End If
If (IntegerArray%(k)=Pattern7%) Then
red%=0
green%=255
blue%=255
pfound=1
End If
If (IntegerArray%(k)=Pattern8%) Then
red%=0
green%=128
blue%=255
pfound=1
End If
If(pfound=1) Then
;Place un Cube-Copie
NewSpcell=CopyEntity(Spcell,trinity)
PositionEntity NewSpcell,xx,yy,zz
EntityColor NewSpcell,red%,green%,blue%
End If
xx=xx+1
;Preparation affichage de stats
sxx$= Str xx
syy$= Str yy
szz$= Str zz
;Mouvements
If KeyHit(1) Then
Exit
End If
If KeyDown( 55 )=True Then
yaw#=5
TurnEntity trinity,0,yaw#,0
End If
If KeyDown( 181 )=True Then
yaw#=-5
TurnEntity trinity,0,yaw#,0
End If
If KeyDown( 76 )=True Then
roll#=5
TurnEntity trinity,0,0,roll#
End If
If KeyDown( 82 )=True Then
roll#=-5
TurnEntity trinity,0,0,roll#
End If
If KeyDown( 71 )=True Then
pitch#=5
TurnEntity trinity,pitch#,0,0
End If
If KeyDown( 73 )=True Then
pitch#=-5
TurnEntity trinity,pitch#,0,0
End If
If KeyDown( 78 )=True Then
zcam#=zcam#+5
PositionEntity cam,xcam#,ycam#,zcam#
End If
If KeyDown( 74 )=True Then
zcam#=zcam#-5
PositionEntity cam,xcam#,ycam#,zcam#
End If
If KeyDown( 72 )=True Then
ycam#=ycam#+5
PositionEntity cam,xcam#,ycam#,zcam#
End If
If KeyDown( 80 )=True Then
ycam#=ycam#-5
PositionEntity cam,xcam#,ycam#,zcam#
End If
If KeyDown( 77 )=True Then
xcam#=xcam#+5
PositionEntity cam,xcam#,ycam#,zcam#
End If
If KeyDown( 75 )=True Then
xcam#=xcam#-5
PositionEntity cam,xcam#,ycam#,zcam#
End If
;Mise a jour du Monde
UpdateWorld
RenderWorld
;Affichage de Stats
Text 650,0, RawFileName$
Text 0,0, " "
NumberOfCells$= Str k
Text 0,0, NumberOfCells$
Text 0,10, "......................"
Text 0,10, sxx$
Text 0,20, "......................"
Text 0,20, syy$
Text 0,30, "......................"
Text 0,30, szz$
Flip
Next ;k
While Not KeyHit(1)
Wend
EndGraphics
End
Et le miniprog générant le fichier .pks, ici pour le 6502:
PatternFile=WriteFile("6502.pks")
WriteByte(PatternFile,141) ;STA
WriteByte(PatternFile,169) ;LDA
WriteByte(PatternFile,76) ;JMP
WriteByte(PatternFile,32) ;JSR
WriteByte(PatternFile,96) ;RTS
WriteByte(PatternFile,201) ;CMP
WriteByte(PatternFile,234) ;NOP
WriteByte(PatternFile,41) ;AND
CloseFile (PatternFile)
Visu d'un dump de cartouche pour console Atari utilisant ce processeur:
Voila.
Toujours à propos de la série "Treshold: Premier Contact", et du signal alien modifiant l'ADN des créatures vivantes qui y sont soumises, on retrouve son symbole fractal dans un Crop Circle datant de 1996:
La méme année, un autre Crop parfois nommé "DNA Crop Circle":
Inspiration ?
Autre détail amusant, un batiment réél de la marine US porte le nom de "Big Horn", une recherche Google:
http://images.google.fr/images?svnum=10&hl=fr&q=bighorn+usns
Quelques liens plus ou moins en rapport:
Créatures des fonds marins:
http://www.livescience.com/php/multimedia/imagegallery/igviewer.php?imgid=701&gid=46
Crop Circles:
http://www.greatdreams.com/strng.htm
OVNIs et Paranormal:
http://www.nationalufocenter.com/ufo/britaincoast.shtml
http://www.paranormal-fr.net/dossiers/index.php
A suivre...
En relisant ce classique de H.G Wells, plusieurs questions.
Comment l'auteur a-t-il pu imaginer, en 1898:
C'est monstrueusement génial !
Sans parler des scénes d'éxode de population que l'on croirait issues du début de la seconde guerre mondiale: Prévision hallucinante du concept de guerre totale.
Pour finir: Il fallait une inspiration incroyable pour envisager le probléme de contamination d'un équipage par des virus ou bactéries présents sur un planéte étrangére.
M6 diffuse actuellement la série "Treshold: Premier contact" débutant par l'observation fatale d'un OVNI par l'équipage du navire "Big Horn" dans l'atlantique nord en septembre 2005.
Cet événement rappelle celui du 26 Juillet 1980, au large du Brésil: Les marins du remorqueur "Caioba Seahorse" on décrit un OVNI flottant d'environ 10 métres de diamétre émettant de vives couleurs multicolores.
13 ans plutot, le 30 Juillet 1967, un objet étrange avait également était observé au large des cotes Brésiliennes (encore) par l'équipage du navire Argentin "Navieros".
Les scénaristes se sont-ils inspirés de ces événements ?
Dans un des épisodes diffusés samedi dernier, un marin du 19 siécle apparait en vision à un membre de l'équipe Treshold et prétend avoir vu un tel objet.
Peut-on également y voir une référence à des témoignages éxistants, comme ceux des hommes du "Innerwich" datant du 24 février 1885 ou du "Siberian" datant du 12 novembre 1887 ?
On verra par la suite...
Toujours au chapitre des étrangetés marines, que penser de cette créature repéchée par un chalutier Japonais (le Zuiyo Maru) au large de la Nouvelle-Zélande le 25 Avril 1977:
L'explication officielle étant: Un cadavre de requin modifié par la décomposition.
Particuliérement symétrique quand méme...
Du code Blitz Basic (prototype et particuliérement rapeux) pour visualiser et regénérer (enfin, essayer...) des fichiers sons contenant des données numériques comme des progs pour Ordis 8bits:
;Wav Analyzer
;28-30 Janvier 2007
;F.Balmer
AppTitle "Wave Analyzer [Proto]"
Type WavHeader
Field RiffMark$
Field SampleSize1% ;32b
Field TypeMark$
Field FormatMark$
Field Unkn1% ;32b
Field Channels# ;16b+16b
Field Freq#
Field BlockAlign1#
Field BlockAlign2# ;16b+16b
Field DataMark$
Field SampleSize2# ;32b
End Type
Global FileHeader.WavHeader= New WavHeader
xmaxres=800
ymaxres=600
WavFileName$=Input$("Fichier Wave: ")
Treshold=Input("Treshold : ")
Print "* Normalisation *"
Print "Avg WaveForm : 1 [Xenomorph]"
Print "Avg Treshold : 2"
Print "Fixed Treshold: 3 [ Default ]"
NormTyp=Input ("NormType : ")
AvgTreshold=0
OldAvgTreshold=0
;Ouverture du fichier d'entree
InFileHandle = ReadFile(WavFileName$)
WavFileSize=FileSize(WavFileName$)
Print
Print "OK. File Size: "+WavFileSize
Print
;Ouverture du fichier de sortie
OutFileHandle = WriteFile("Out.wav")
;Parcours et recopie du header
For k=1 To 4 ;RiffMark
Tempo=ReadByte(InFileHandle)
WriteByte(OutFileHandle,Tempo)
FileHeaderRiffMark$=FileHeaderRiffMark$+Chr$(Tempo)
Next
For k=1 To 4 ;SampleSize1
Tempo=ReadByte(InFileHandle)
WriteByte(OutFileHandle,Tempo)
;
Next
For k=1 To 4 ; TypeMark
Tempo=ReadByte(InFileHandle)
WriteByte(OutFileHandle,Tempo)
FileHeaderTypeMark$=FileHeaderTypeMark$+Chr$(Tempo)
Next
For k=1 To 4 ;FormatMark
Tempo=ReadByte(InFileHandle)
WriteByte(OutFileHandle,Tempo)
FileHeaderFormatMark$=FileHeaderFormatMark$+Chr$(Tempo)
Next
For k=1 To 4 ;Unkn1
Tempo=ReadByte(InFileHandle)
WriteByte(OutFileHandle,Tempo)
;
Next
For k=1 To 4 ;Channels
Tempo=ReadByte(InFileHandle)
WriteByte(OutFileHandle,Tempo)
;
Next
For k=1 To 4 ;Freq
Tempo=ReadByte(InFileHandle)
WriteByte(OutFileHandle,Tempo)
;
Next
For k=1 To 4 ;BlockAlign1
Tempo=ReadByte(InFileHandle)
WriteByte(OutFileHandle,Tempo)
;
Next
For k=1 To 4 ;BlockAlign2
Tempo=ReadByte(InFileHandle)
WriteByte(OutFileHandle,Tempo)
;
Next
For k=1 To 4 ;DataMark
Tempo=ReadByte(InFileHandle)
WriteByte(OutFileHandle,Tempo)
FileHeaderDataMark$=FileHeaderDataMark$+Chr$(Tempo)
Next
For k=1 To 4 ;SampleSize2
Tempo=ReadByte(InFileHandle)
WriteByte(OutFileHandle,Tempo)
;
Next
Print FileHeaderRiffMark$
Print FileHeaderTypeMark$
Print FileHeaderFormatMark$
Print FileHeaderDataMark$
;Verifier la présence des 4 chaines
;Pour déclarer un .wav valide
While Not KeyHit(1)
Wend
Graphics xmaxres,ymaxres,24,2
Color 255,0,127
x=0
y=0
For k=1 To WavFileSize-44
SampleValue=ReadByte(InFileHandle)
;Normalisation par rapport
;au Treshold Statique
If (SampleValue<Treshold) Then
NormSampleValue=55
Else
NormSampleValue=200
End If
yScreenValue=Int (ymaxres-(SampleValue*ymaxres/255))
yNormScreenValue=Int (ymaxres-(NormSampleValue*ymaxres/255))
;Forme d'onde reelle
Color SampleValue,0,127
Plot x,yScreenValue
;Normalise
Color 0,255,127
Plot x,yNormScreenValue
;Calcul du Treshold Moyen
If k=1 Then
AvgTreshold=SampleValue
OldAvgTreshold=AvgTreshold
Else
AvgTreshold=Int((OldAvgTreshold+SampleValue)/2)
OldAvgTreshold=AvgTreshold
End If
;Normalisation par rapport
;au Treshold Moyen
If (SampleValue<AvgTreshold) Then
NormSV2=55
Else
NormSV2=200
End If
yNormSV2=Int (ymaxres-(NormSV2*ymaxres/255))
;Point de Treshold Moyen
Color 0,67,255
yAvgTresh=Int (ymaxres-(AvgTreshold*ymaxres/255))
Plot x,yAvgTresh
;Normalise 2
Color 255,255,0
Plot x,yNormSV2
;Ecriture dans fichier de sortie
;En fontion de NormTyp
Select NormTyp
Case 1
WriteByte(OutFileHandle,AvgTreshold)
Case 2
WriteByte(OutFileHandle,NormSV2)
Case 3
WriteByte(OutFileHandle,NormSampleValue)
Default
WriteByte(OutFileHandle,NormSampleValue)
End Select
x=x+1
If (x>xmaxres) Then
;Statistiques
Color 255,255,0
Text 635,10, WavFileName$
Text 635,25, "Seek : ........."
Text 635,25, "Seek : "+Str k
Text 635,40, "Value : ..."
Text 635,40, "Value : "+Str SampleValue
Text 635,55, "Treshold: "+Str Treshold
Text 635,70, "AvgTresh: ..."
Text 635,70, "AvgTresh: "+Str AvgTreshold
Delay 25
Cls
;Ligne de Treshold
Color 0,0,255
yTresh=Int (ymaxres-(Treshold*ymaxres/255))
Line 0,yTresh,xmaxres,yTresh
;Pseudo Scroll
x=0
y=y+1
End If
Next
CloseFile (InFileHandle)
CloseFile (OutFileHandle)
While Not KeyHit(1)
Wend
End
Il y a encore du boulot sur la regénération, mais la visu est déja pas mal.
| Novembre 2009 | ||||||||||
| L | M | M | J | V | S | D | ||||
| 1 | ||||||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 | ||||
| 9 | 10 | 11 | 12 | 13 | 14 | 15 | ||||
| 16 | 17 | 18 | 19 | 20 | 21 | 22 | ||||
| 23 | 24 | 25 | 26 | 27 | 28 | 29 | ||||
| 30 | ||||||||||
|
||||||||||
Commentaires