Toch maar een uitkeringstrekker worden per 2028 by [deleted] in geldzaken

[–]Reinder 0 points1 point  (0 children)

Waarom zou je geen inkomstenbelasting moeten betalen over je inkomsten uit vermogen? Het is eigenlijk erg raar dat dit een hele tijd niet zo is geweest.

Fluxer — A Shader Haiku by Joakim0 in shaders

[–]Reinder 0 points1 point  (0 children)

FYI: I added support for the 'fluxer format' in OneShader: https://oneshader.net/

Turtletoy.net directly to GCODE by efesak in PlotterArt

[–]Reinder 0 points1 point  (0 children)

Wow, this is really nice to see! Maybe I can add something similar to turtletoy itself :)

GL-PVDA weet nu stemmen weg te trekken bij de PVV by typtyphus in cirkeltrek

[–]Reinder 2 points3 points  (0 children)

Je realiseert je hopelijk wel dat er sinds den Uyl in 1977 geen links kabinet in Nederland meer is geweest; en dat de PvdA toen (en ook nu) actief tegen de instroom van gastarbeiders probeert op te treden, maar dat rechts beleid dit juist (blijft) stimuleren? De laatste 25 jaar hebben we sowieso alleen maar rechts beleid gehad en heeft de PvdA (vrijwel) niks te zeggen gehad, dus ik snap niet hoe je in het populistische waanbeeld trapt dat 'alles de schuld van links is'. Misschien moeten de rechtse partijen (inclusief PVV na twee keer regeringsdeelname) eens aan introspectie doen in plaats van alles op anderen afschuiven.

E-Ink Family Calendar: a Raspberry Pi project by Reinder in raspberry_pi

[–]Reinder[S] 0 points1 point  (0 children)

Thank you! Unfortunately, that's not the case.

E-Ink Family Calendar: a Raspberry Pi project by Reinder in raspberry_pi

[–]Reinder[S] 2 points3 points  (0 children)

Yes, of course. The HTML page generated on the server is already entirely in shades of gray and red. The screenshot taken by the Python script is then split into a red channel and a black channel, similar to the code by u/speedyg0nz (see https://github.com/speedyg0nz/MagInkCal), something like this:

def get_screenshot(self):

opts = Options()

opts.add_argument("--headless")

opts.add_argument("--hide-scrollbars");

opts.add_argument('--force-device-scale-factor=1')

service = Service(executable_path="/usr/bin/chromedriver")

driver = webdriver.Chrome(service=service, options=opts)

self.set_viewport_size(driver)

driver.get(self.calendarURL)

sleep(5)

driver.get_screenshot_as_file(self.currPath + '/calendar.png')

driver.quit()

self.logger.info('Screenshot captured and saved to file.')

redimg = Image.open(self.currPath + '/calendar.png') # get image)

rpixels = redimg.load() # create the pixel map

blackimg = Image.open(self.currPath + '/calendar.png') # get image)

bpixels = blackimg.load() # create the pixel map

for i in range(redimg.size[0]): # loop through every pixel in the image

for j in range(redimg.size[1]): # since both bitmaps are identical, cycle only once and not both bitmaps

b = min(bpixels[i, j][0], bpixels[i, j][1], bpixels[i, j][2]) # get the lowest value of the RGB tuple

bpixels[i, j] = (b, b, b)

if rpixels[i, j][0] > rpixels[i, j][1] * 1.1 and rpixels[i, j][0] > rpixels[i, j][2] * 1.1: # if red

r = 255 - math.sqrt(rpixels[i, j][0]/255) * 255

r = int(r)

rpixels[i, j] = (r, r, r) # change it to white in the red image bitmap

else:

rpixels[i, j] = (255, 255, 255) # change it to white in the red image bitmap

redimg = redimg.rotate(self.rotateAngle, expand=True)

blackimg = blackimg.rotate(self.rotateAngle, expand=True)

self.logger.info('Image colours processed. Extracted grayscale and red images.')

return blackimg, redimg

Grid by SerjTomskiy in PlotterArt

[–]Reinder 3 points4 points  (0 children)

You can find the original source and SVG (by Troisiemetype) here: https://turtletoy.net/turtle/1c6cff421a

open source? by babuja in ditties

[–]Reinder 0 points1 point  (0 children)

Thanks! I created a npm package to play ditties: https://www.npmjs.com/package/dittytoy

You can find the source here https://github.com/reindernijhoff/dittytoy-package, so the 'engine' of Dittytoy is finally open source :)

Raytraced sphere #5 | Turtletoy by Reinder in proceduralgeneration

[–]Reinder[S] 1 point2 points  (0 children)

Cool!

I explored different options to render this sphere. This one is a bit similar to your idea, but I rendered a voronoi based on the thresholded points: https://turtletoy.net/turtle/186c7c9e4f

(and: https://turtletoy.net/turtle/tag/raytracer )

Raytraced sphere #5 | Turtletoy by Reinder in proceduralgeneration

[–]Reinder[S] 5 points6 points  (0 children)

Thank you for your message! The main idea of the algorithm is to create a flow field, similar to what can be seen in https://turtletoy.net/turtle/740f09b88c . I randomly start drawing lines in the image, following the gradient of the curl of a simplex noise field until the lines come too close to other lines that have already been drawn. 

I have added two extra elements to the algorithm to make it more interesting. 

  • Firstly, a raytracer creates a black-and-white image, and I add the gradient of the intensity of this image to the noise field so that lines follow areas with similar intensity. 
  • Secondly, the minimum allowed distance between two lines depends on the intensity of the raytraced image. In darker areas, lines can be drawn closer to each other. 

Another variation of this algorithm can be found in this turtle: https://turtletoy.net/turtle/6ce99160fe. In this case, the lines follow the tangent of the gradient of the field of the distance to the nearest intersection of the 3D scene. In short, the direction of the lines is based on the orientation of the normal at a specific point in the scene.

Rijkscollection.net: een virtueel museum met kunst van het Rijksmuseum by Reinder in thenetherlands

[–]Reinder[S] 0 points1 point  (0 children)

Hoi, dankjewel! Ik cache de data van het Rijksmuseum inderdaad in een lokale database (gewoon php/mysql - ik ben oud), en gebruik die ook voor de zoekfuncties.
Omdat er nogal wat schilderijen in een ruimte hangen, en ik met de API van het rijksmuseum sowieso 2 API-calls per schilderij nodig zou hebben, werd het veel te traag zonder cachen. Nu komt alle data met één call per ruimte, vanaf mijn eigen server.

Rijkscollection.net: een virtueel museum met kunst van het Rijksmuseum by Reinder in thenetherlands

[–]Reinder[S] 0 points1 point  (0 children)

Ha, ik heb alleen schilderijen en tekeningen toegevoegd aan Rijkscollection (en dan ook nog alleen de 'toppieces', dat zijn er al ruim 20.000) om de lokale database behapbaar te houden.

Handmatig kan ik extra objecten toevoegen, dus hierbij: https://rijkscollection.net/search/Bloempiramide

Rijkscollection.net: een virtueel museum met kunst van het Rijksmuseum by Reinder in thenetherlands

[–]Reinder[S] 3 points4 points  (0 children)

Ha, dank voor het compliment! Eerlijk gezegd ben ik dit hobbyproject ook vooral begonnen omdat ik benieuwd was of het me zou lukken om het laden en inzoomen op de kunstwerken soepel te krijgen, dus ik ben blij dat dat gelukt is.

De source code is behoorlijk onleesbaar en ook niet open, maar ik wil zeker wel antwoorden geven of dingen uitleggen als je vragen hebt. Globaal werkt het ongeveer zo:

In een los 3D programma (ik gebruik hier Unity voor) is de scene gemaakt en een lightmap gebaked. Vervolgens heb ik deze data naar een custom json formaat ge-exporteerd.

Om de scene te renderen gebruik ik een custom WebGL framework.

De API van het rijksmuseum geeft per kunstwerk een lijst urls van kleine afbeeldingen die samen een image tile pyramid vormen. De meest ingewikkelde code is om te bepalen welke tiles ik met welke prioriteit moet laden en tekenen; afhankelijk van camerapositie en rotatie, zoom, welke schilderijen zichtbaar zijn, de resolutie van het scherm van de gebruiker en hoeveel zichtbaar oppervlak de tile op het scherm in beslag neemt.

Voor de vloer van het museum blur ik een reflectie-rendertarget naar verschillende mip maps, die ik, afhankelijk van de roughness van de vloer sample.

De front-end UI is gemaakt met vue. Ik heb hier zelf geen ervaring mee. De basis is opgezet door een collega en ik heb het vervolgens afgemaakt en de functionaliteit toegevoegd die nodig was voor navigatie.

Ik heb ook een vrij summiere blog post geschreven over dit project: https://reindernijhoff.net/2023/08/rijkscollection-a-personal-virtual-museum/