I think it’s a cool idea Usually you’d just
max(dot(v,w), 0.0)
, since dot < 0 values mean the ray comes from under the surface. For contrast usually I do smoothstep(vec3(0.0), vec3(1.0), color)
, then you can play around with the edges.
Right. Sometimes I use the non-max-approach because then I can simulate two lights coming from opposite sides at once Then I set complementary colors on each.
Side question: should we create a new doodles post when they contain, say, 10 images?
@abe @ricardo,
Thank you for the tips, I will try them!
I hope to see openrndr get more cool features in this area.
My latest experiment: I wanted to plot text with the axidraw. I didn’t want to use standard fonts but single stroke fonts. In Inkscape I created a bunch of squares and gave them IDs. For the letters the ID is just the same letter. For symbols and numbers I used cNN
where NN is the ascii code. For example, c48
for the zero.
Then I load that SVG from OPENRNDR creating a map of characters to shapes, searching for the shapes that are located over the square. Later I can convert any text to strokes by using that map. This is an example of how it looks like:
Creating a hand drawn font now takes me as long as writing it with my graphics tablet Now time to put it on paper!
source code // hipster text generator
ps. One reason to try OPENRNDR (as a Processing and openFrameworks user) was to find out if I could somehow be more expressive or faster, to see if the different language would enable me to express ideas or data structures in a simpler way. Now I can say that it is the case. I think that in the past the environment was sometimes slowing me down and I would spend time wrestling the computer to make it understand or the code would grow too large to express not so complex ideas. Now, after not so many weeks of experimentation, I have the strange feeling that I write something and it just works on the first run with very few lines of code. I’m not used to it but I’m happy to be in this new situation
Wow, that code is so incredibly clean! Thanks for sharing it.
implementation of the marching squares algorithm to generate contours
Separating objects (using their radius instead of their centers):
And here calculating a convex hull for a bunch of points:
Based on https://rosettacode.org/wiki/Convex_hull#Kotlin That page is quite cool. It shows the same program like in 30 different languages. Not sure about the quality of implementations, but maybe gives an approximate idea. With Julia, Mathematica and Python it’s too easy! My Kotlin Convex Hull is here.
A work in progress shot of the orx-dnk3
scene graph renderer + gltf loader. Model is not mine and render may have some color space issues.
Ultimate corona virus protection
In this experiment, I started with a reaction diffusion simulation (in black and white ).
Then I took that image as a bump-map for creating an “emboss” effect
As it got quiet again - here a small experiment in simple abstraction:
Welcome to the forum @axel ! Great to see your post
I didn’t post more because I didn’t want to hijack the thread hehe But looking forward to see what people are doing!
I worked a bit on tangents and intersections:
It’s also in in twitter in case it doesn’t show here.
And another sketch:
Some recent ones to keep the thread alive
This one applies boofcv hundreds of times (converting pixels to curves) to build a shape:
This one uses methods to find circle-tangents between two circles (note the praying bot):
And this one uses something like gravitational forces attracting towards changing targets: