PixelCompetition/C180: Unterschied zwischen den Versionen

Aus Magrathea Laboratories e.V.
Zur Navigation springen Zur Suche springen
 
(8 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 9: Zeile 9:
 
     --> Nope --> RIDDLE {x} {y} {riddle}
 
     --> Nope --> RIDDLE {x} {y} {riddle}
  
     x:    x-Koordinate of a pixel
+
     x:    x-Coordinate of a pixel
     y:    y-Koordinate of a pixel
+
     y:    y-Coordinate of a pixel
 
     color: color encoded as a html color (rgb-values as hex)
 
     color: color encoded as a html color (rgb-values as hex)
  
Zeile 20: Zeile 20:
 
     NOTE: Others may solve the riddle faster than you, in this case you get back a nope and the current riddle
 
     NOTE: Others may solve the riddle faster than you, in this case you get back a nope and the current riddle
 
</nowiki>
 
</nowiki>
 +
In dieser Competition muss zum Setzen von Pixeln eine Rechenaufgabe gelöst werden. Mit dem Befehl ''ASK'' könnt Ihr eine Zahl für ein Koordinatenpaar abfragen. Dann bekommt Ihr eine Zahl zurück. Deren Quadratwurzel hängt Ihr an den bekannten ''PX''-Befehl an um einen Pixel zu setzen.
  
 
= Hintergrund =
 
= Hintergrund =
  
[https://de.wikipedia.org/wiki/Primfaktorzerlegung https://de.wikipedia.org/wiki/Primfaktorzerlegung]
+
[https://de.wikipedia.org/wiki/Quadratwurzel https://de.wikipedia.org/wiki/Quadratwurzel]
  
[https://www.youtube.com/watch?v=rK3j0hGGM5w Video von  Daniel Jung]
+
= Beispiel =
 +
 
 +
= rc3 =
  
= Beispiel =
 
 
  <nowiki>
 
  <nowiki>
  not public, yet
+
ASK 100 100
 +
--> RIDDLE 100 100 2397028773855426499123456
 +
PX 100 100 #00FF00 1548234082384
 +
--> OK
 +
 
 +
ASK 100 101
 +
--> RIDDLE 100 101 5479466062388103591171136
 +
PX 100 100 #00FF00 2348025935944
 +
--> Nope
 +
--> RIDDLE 100 101 5479466062388103591171136
 +
PX 100 101 #00FF00 2340825935944
 +
 
 +
ASK 100 102
 +
--> RIDDLE 100 102 5486567648690729648567556
 +
PX 100 102 #00FF00 2342342342334
 +
--> OK
 +
 
 +
 
 
</nowiki>
 
</nowiki>
  
= rc3 =
 
 
Während der rc3 läuft diese Competition in den Abendstunden, s.a. [[PixelCompetition#Fahrplan_zur_rc3|Fahrplan]].
 
Während der rc3 läuft diese Competition in den Abendstunden, s.a. [[PixelCompetition#Fahrplan_zur_rc3|Fahrplan]].
  
 
[[Gehört zu::PixelCompetition]]
 
[[Gehört zu::PixelCompetition]]

Aktuelle Version vom 29. Dezember 2020, 23:19 Uhr

C180 - square root competition

    This Competition implement a riddle protocol asking for square roots.
    ASK {x} {y}
    --> RIDDLE {x} {y} {riddle}

    PX {x} {y} #{color} {result}
    --> OK
    --> Nope --> RIDDLE {x} {y} {riddle}

    x:     x-Coordinate of a pixel
    y:     y-Coordinate of a pixel
    color: color encoded as a html color (rgb-values as hex)

    ASK returns a {riddle} for the given coordinate, in this competition it returns a number.
    PX  sets a pixel by providing the {result} of the riddle.

    {result} shall be the square root of {riddle}

    NOTE: Others may solve the riddle faster than you, in this case you get back a nope and the current riddle

In dieser Competition muss zum Setzen von Pixeln eine Rechenaufgabe gelöst werden. Mit dem Befehl ASK könnt Ihr eine Zahl für ein Koordinatenpaar abfragen. Dann bekommt Ihr eine Zahl zurück. Deren Quadratwurzel hängt Ihr an den bekannten PX-Befehl an um einen Pixel zu setzen.

Hintergrund

https://de.wikipedia.org/wiki/Quadratwurzel

Beispiel

rc3

ASK 100 100
--> RIDDLE 100 100 2397028773855426499123456
PX 100 100 #00FF00 1548234082384
--> OK

ASK 100 101
--> RIDDLE 100 101 5479466062388103591171136
PX 100 100 #00FF00 2348025935944
--> Nope
--> RIDDLE 100 101 5479466062388103591171136
PX 100 101 #00FF00 2340825935944

ASK 100 102
--> RIDDLE 100 102 5486567648690729648567556
PX 100 102 #00FF00 2342342342334
--> OK



Während der rc3 läuft diese Competition in den Abendstunden, s.a. Fahrplan.

PixelCompetition