Seite 1 von 1

wer macht schönere muster

Verfasst: 20.08.2008 02:54
von RolandIV
hab bisschen rumgespielt sieht irgendwie toll aus. hab version 3.9 vllt läufts bei dem einen oder anderen noch :)
fragt mich nicht nach dem tieferen (mathematischen) sinn, hab einfach nur mit sin und cos rumgespielt

Code: Alles auswählen

InitSprite()
InitKeyboard()
InitMouse()
OpenScreen(1024,768,32,"Sinus/Cosinus")
Repeat
  ExamineMouse()
  ExamineKeyboard()
  ClearScreen(0,0,0)
  StartDrawing(ScreenOutput())
    radius.f=0
    For h=0 To 2000
      Box(500+h/10*Cos(h)*Sin(h),400+h/10*Sin(h),1,1,RGB(255,255,255))
    Next    
    For h=0 To 2000
      Box(500+h/10*Cos(h)*Cos(h),400+h/10*Sin(h),1,1,RGB(255,255,255))
    Next        
    For h=0 To 2000
      Box(500+h/10*Sin(h)*Cos(h),400+h/10*Sin(h),1,1,RGB(255,255,255))
    Next 
    For h=0 To 3600
      Box(500+h/2*Cos(h),400+h/2*Sin(h),1,1,RGB(255,255,255))
    Next 
    For h=0 To 2000
      Box(500+h/10*Cos(h),400+h/10*Cos(h)*Sin(h),1,1,RGB(255,255,255))
    Next 
    For h=0 To 2000
      Box(500+h/10*Cos(h)*Cos(h)*Sin(h)*ATan(h),400+h/10*Sin(h),1,1,RGB(255,255,255))
    Next             
  StopDrawing()
  FlipBuffers()
  If KeyboardPushed(1) : End : EndIf
ForEver
[/code]

Verfasst: 20.08.2008 11:10
von STARGÅTE
ich :lol:

ist auch etwas Farbe und bewegung drin ^^

Code: Alles auswählen

InitSprite() 
InitKeyboard() 
InitMouse() 
OpenScreen(1024,768,32,"Sinus/Cosinus") 
Repeat 
  ExamineMouse() 
  ExamineKeyboard() 
  ClearScreen(0) 
  StartDrawing(ScreenOutput()) 
   u + 5
   For r = 0 To 250 Step 10 
   For n = 1 To 3600 Step 5
    x = Cos(n*#PI/1800)*(r+50)*0.7*(1.5-Pow(Abs(Sin((n+u)*#PI/3600*5)),0.8))
    y = Sin(n*#PI/1800)*(r+50)*0.7*(1.5-Pow(Abs(Sin((n+u)*#PI/3600*5)),0.8))
    F = RGB(r,Pow((r-128)/128,2)*255,255-r)
    Plot(x+512,y+384,F)
   Next
   Next
  StopDrawing() 
  FlipBuffers() 
  If KeyboardPushed(1) : End : EndIf 
ForEver 

Verfasst: 20.08.2008 11:46
von rolaf
nö ich :mrgreen: ohne Cosi und Nus :lol:

Code: Alles auswählen

InitSprite()
InitKeyboard()
InitMouse()
OpenScreen(1024,768,24,"Ohne Cosi und Nus")
ClearScreen(0)
Repeat
  StartDrawing(ScreenOutput())
  ExamineMouse()
  ExamineKeyboard()
  For i = 1 To 10000
    Plot(Random(1023), Random(767), RGB(Random(255), Random(255), Random(255)))
  Next i
  StopDrawing()
  FlipBuffers()
  If KeyboardPushed(1) : End : EndIf
ForEver 
Es lebt...

Verfasst: 20.08.2008 11:56
von STARGÅTE
TIP:

das ist so viel geiler ^^

Code: Alles auswählen

Global DesktopOutput_Memory = AllocateMemory(1024)
Procedure.l DesktopOutput() 
 PokeL(DesktopOutput_Memory, 1)
 ProcedureReturn DesktopOutput_Memory
EndProcedure 
StartDrawing(DesktopOutput()) 
 Repeat 
  Plot(Random(1023), Random(767), RGB(Random(255), Random(255), Random(255))) 
 Until GetAsyncKeyState_(27)
StopDrawing() 

Verfasst: 20.08.2008 12:13
von rolaf
:lol: Pixelmassage ...nur die Start-Taste will sich nicht "bekleckern" lassen.

Verfasst: 20.08.2008 15:00
von AND51
@ Stargate:
So ist noch viel schöner...

Code: Alles auswählen

Global DesktopOutput_Memory = AllocateMemory(1024) 
Procedure.l DesktopOutput() 
 PokeL(DesktopOutput_Memory, 1) 
 ProcedureReturn DesktopOutput_Memory 
EndProcedure 
StartDrawing(DesktopOutput()) 
GetCursorPos_(alt.POINT)
 Repeat 
 	GetCursorPos_(neu.POINT)
  Line(alt\x, alt\y, neu\x-alt\x, neu\y-alt\y, Random(1<<24))
  alt\x=neu\x
  alt\y=neu\y
 Until GetAsyncKeyState_(27) 
StopDrawing() 
Für die einen ist es einfach nur eine Freihandlinie, für die anderen die längste Mausspur der Welt... :D

Verfasst: 20.08.2008 15:38
von STARGÅTE
da muss ich ja selber "arbeiten":

dann lieber arbeiten lassen:

Code: Alles auswählen

Global DesktopOutput_Memory = AllocateMemory(1024) 
Procedure.l DesktopOutput() 
 PokeL(DesktopOutput_Memory, 1) 
 ProcedureReturn DesktopOutput_Memory 
EndProcedure 
StartDrawing(DesktopOutput()) 
alt.POINT
neu.POINT
alt\x = 512
alt\y = 384
 Repeat 
  neu\x = alt\x+Random(4)-2
  neu\y = alt\y+Random(4)-2
  Line(alt\x, alt\y, neu\x-alt\x, neu\y-alt\y, Random(1<<24)) 
  alt\x=neu\x 
  alt\y=neu\y 
  If alt\x < 0 : alt\x + 1024 : EndIf
  If alt\x > 1023 : alt\x - 1024 : EndIf
  If alt\y < 0 : alt\x + 768 : EndIf
  If alt\y > 767 : alt\x - 768 : EndIf
 Until GetAsyncKeyState_(27) 
StopDrawing()