Doodles Wall c[_]

A place to share some doodles/work in progress :paintbrush:

7 Likes

Beautiful! :heart_eyes: How did you choose the colors?

Thanks! This one was one of my early experiments with the compositor… the colors were probably chosen through orx-palette.


Testing combination of pinhole camera and iridescence generator.

3 Likes

That’s a rewrite of an openFrameworks program from earlier this year. The idea is to create a line-based generative design program to create images for the Axidraw plotter.

It’s just version 0.0.1 :slight_smile: I have many ideas of things to implement. My approach is to draw by hand in a book, then extract ideas from those drawings to implement in the program.

4 Likes

I ported this Processing program to OPENRNDR

2020-03-17-153629_602x401_scrot

Source at https://github.com/hamoid/openrndr-template/tree/master/src/main/kotlin (Both PanZoom* files)

Feedback about making https://github.com/hamoid/openrndr-template/blob/master/src/main/kotlin/PanZoomSketch.kt#L68 cleaner is welcome :slight_smile: The val canvas = this feels weird. Or any other improvements. I’m still learning Kotlin and OPENRNDR.

The program has a bug which becomes apparent by setting width = 900: it doesn’t properly account for the aspect ratio.

3 Likes

The idiomatic way is to use activeCanvas?.let { }, which has an implicit it argument that points activeCanvas and leaves this untouched.

Thank you! Fixed. Much better now. I didn’t remember that I could name it to avoid shadowing previous declarations.

I enjoyed porting the code which is in many places simpler thanks to Kotlin and OR :slight_smile:

Something I did in the last Creative Code Jam (Berlin) and actually the first one that took place online via https://meet.jit.si with participants from Berlin, Kölln, the Netherlands and London :slight_smile:

3 Likes

A simple shape toy that uses new orx-gui and orx-shapes functionality.

Corners02.kt (2.8 KB)

3 Likes

I’m recreating in OPENRNDR the program I used to generate these images.

Still a very early version, but I see it’s going to be much simpler than when I did that in Processing and then in openFrameworks. In those cases I used polygon clipping libraries. In this case I wrote a minimal one in 10 lines of code. Another change is that in the previous cases I created a gradient texture, but now I know how to do that with shaders. I plan to use an exponential variation of the linearGradient.

I borrowed this function from OF. Thank you :slight_smile:

        fun ShapeContour.contains(pos: Vector2): Boolean {
            var counter = 0
            var xinters = 0.0
            var p1: Vector2
            var p2: Vector2

            var n = segments.size

            p1 = segments[0].start;
            for (i in 1..n) {
                p2 = segments[i % n].start;
                if (pos.y > min(p1.y, p2.y)) {
                    if (pos.y <= max(p1.y, p2.y)) {
                        if (pos.x <= max(p1.x, p2.x)) {
                            if (p1.y != p2.y) {
                                xinters = (pos.y - p1.y) * (p2.x - p1.x) / (p2.y - p1.y) + p1.x
                                if (p1.x == p2.x || pos.x <= xinters)
                                    counter++
                            }
                        }
                    }
                }
                p1 = p2;
            }

            return counter % 2 != 0;
        }
3 Likes
View this post on Instagram

Smoke spiral no. 2. Dual Jetstream. . . . #art #animation #creativecoding #generativeart #codeart #openrndr #kotlin

A post shared by Yann Le Gall (@ylegall) on Mar 26, 2020 at 5:26pm PDT

2 Likes


A rules-based design.

This version fixes an issue with the previous rules. I plot these things with an axidraw. In my previous iteration I had like 200 lines in the same area, so the pen kept moving in the same spot trying to destroy the paper again and again. Very scary :slight_smile: I tried lifting the pen while it was drawing. I had an idea to do that in the future: attach a string I can pull in case I need to lift the pen while it draws, but not cancelling.

Now there’s a very dark area in the plot, but fortunately it did not go through :slight_smile: not even the ink! Very stubborn paper :slight_smile:

3 Likes

This is how it looks today

3 Likes

Hey people! Where are your doodles? I miss them :slight_smile:

Here my most recent one:

2 Likes
3 Likes

Not sure this is the best way to share these since these platforms require logging in.

4 Likes

Here is a 3D sketch I did with orx-mesh-generators.
I’m new to 3D rendering, and it was a bit hard to make a fragment shader for lighting. I ended up doing something like this:

    fragmentTransform = """
        float dot_prod = dot(-va_normal, p_light);
        float angle = asin(dot_prod);
        float light = clamp(angle/3.14159, 0.0, 1.0);                                                       
        x_fill.rgb = mix(p_color2.rgb, p_color1.rgb, light);
    """.trimIndent()
    parameter("light", Vector3.UNIT_Y)
    parameter("color1", color1)
    parameter("color2", color2)

I would still like to learn how to make wireframes (no fill, only stroke between vertices).

3 Likes

Very nice @derpivore :slight_smile: I would say you don’t need asin() as dot_prot is a value between -1.0 and +1.0 so you can just map it in some way (for non realistic but tweakable light). Sometimes I do float light = dot(...) * 0.5 + 0.5 and then bend that to add more contrast. Simple one is light * light (quadratic), more flexible is pow(light, 3.3); because you can tweak the exponent. And even more flexible is using shaping functions from Golan Levin. Those functions work but sometimes you need to convert ints to double.

Nice @ricardo :slight_smile: One thing I would like more is if the little sticks didn’t grow and shrink from the same point, but grow from start point and shrink towards the end point. What do you think?

1 Like