This is a personal blog, please observe Think Hour for ad hoc quasi-diary writings and Big Ideas for my ratified longform items. I will see you there.


2020-09-02


We must continue posting in the face of adversity. We must endure the process in delivery of what our vessel was purposed to. Day 2 of 7 and potentially more in a row.

How To Walk a Hexagon // Open Frameworks & junkiyoshi

I like to look at generative art sometimes. It’s pretty cool to follow people who create the stuff on Twitter, and occasionally have their creations present themselves to you as you trawl the sludge… it isn’t often very depthy or complex stuff, but can offer a dose of pleasure, intrigue or even sometimes inspiration if the right machination finds its way to you as you think in a lane that it might be corollary to. Right? One man I follow is called “junkiyoshi” and he seems to be Japanese. There’s something geometrically pleasing about his hexagonal play here.

Random hexagon walker.

Now with this guy and other such creators/accounts, I noticed this phrase “Open Frameworks”. What is it? Well it states itself to be a wrapping together of the cleanest/simplest C++ libraries for audio visual purpose. Designed around being simple, cross-platform and intuitive. Originally a teaching tool, it grew into a creative community unto itself with people not only using it to easily create graphical stuff with C++ but also to author add-ons and contribute to the project itself.

It sounds quite similar to Processing. Processing is used in a similar way but rather than accessing C++ library you are accessing Java. Both generate art and graphics, by utilizing their respective collection of libraries through interpreting the code that you write. It seems like OF has the more active community boosting the scope of possibilities with various add ons.

Split&Rotate

I must try it out. It really kills me that I have so little knowledge of programming. Maybe I ought to start with just GLSL, read the book of shaders and browse shadertoy for some inspiration. Let me do it. First though I must check out more of junkiyoshi work and code.

He has them embedded on his site using neort.io, which seems to harness and host such creative coding methods. Kind of like shadertoy I guess. There’s a host of ugly raymarching experiments on the explore page, and apparently you can upload video… I assume to augment with code? I’m now interested in browsing through to decide how I will begin enjoying the basics of creative coding. Anyway just to clear some Open Frameworks mystery, let me see bits of junkiyoshi hexagon walking code:

ofBackground(239); ofEnableBlendMode(ofBlendMode: :OF_BLENDMODE_MULTIPLY);

There’s lots of simple declarations that I can discern. It seems like there’s a header section “ofapp.h” where declarations are made such as potentially what libraries/add-ons will be used/referenced. Above you can see a practically plain English reference to a multiply blending mode. This is very human friendly looking, compared to my scary imagination of what C++ is.

void ofApp::update() {

auto span = this->radius * sqrt(3); for (auto& log_list : this->hexagon_list) {

int r = ofRandom(6); int deg_start = r * 60; for (int deg = deg_start; deg < deg_start + 360; deg += 60)

You can see in the code above part of an update section, which I assume contains the code that calculates where the next hexagons will be drawn, the colour/opacity of old ones and so on, hence letting them walk once the “scene” is drawn again with these updated setting. This is very nice and elegant. The syntax is quite clear, and the ease of use side of the OF gambit seems to pay off in this regard. That said, this creation itself likely belongs to one of the simplest brackets. This is great. I’m still going to try out OpenGL first though. Junkiyoshi has several cool works worth seeing, that I have seen.

p5js

This one was made using p5js, by Almina. Anyway, please follow junkiyoshi twitter account, so you can see what I see.

How To Play Bridge // American Contract Bridge League

I watched Bill Gates on Charlie Rose, an old interview, a while ago now. One of the funny things that he mentioned is that Warren Buffet only uses computers to play “bridge” (or something to that effect). I’ve spent a lot of time playing Solitaire in software solutions provided by Gates, but I don’t know what that is. In signing up for MSN and accessing their games page as part of a “retro action” I noticed they had bridge, and my non-knowing of how to play it was brought into focus.

BillG on Charlie Rose

Let me see here. This is way more complex than I initially imagined. This is unbelievable, I might have a low IQ or something, I am getting frustrated reading the instructions here.

To describe my understanding of it, I’d start with the “play phase” rather than the “bidding phase”. Note that everyone is given a quarter of a shuffled deck, and they’re in teams opposite on a table of 4. The bidding phase ends with a “contract” designated by and for the winning bidder(s team), forget about it for now. The “play” is done by going around the table, each player putting down a card, and this is done 13 times (the point where players will have exhausted their hands). The player must follow suit (if they can), the highest number winning that one rotation, which is called a “trick”.

However, the contract complicates things slightly. The contract assumes the form of a level (number, simple value) and a suit (or no suit). The team who have the contract must achieve a base 6 tricks, plus the amount of the level in the contract. The suit in the contract acts as a wildcard, meaning if any of the players cannot follow suit during play, they can use a card of this suit instead and still win. Simple.

My Bridge Win

That would be fine, if this “contract” combination was random. It isn’t, and the game is much more nuanced for it. The bidding phase that determines the contract is done before the play phase. We go around the table, and each player makes a bid based on their hand (which was dealt before even the bidding began). They can also pass if they aren’t confident in their hand, since for bidding purpose the suits given value in order: spade > heart > diamond > club and each bid must be higher than the last. Once three players pass on bidding, the highest bid becomes contract for the person (and thus team) who made it.

The thing to consider here is the communication to your partner in making bids, the opponents gleaning information from bids too and how high a level you’re willing to go based on the strength of your hand (high numbers? bid that you’ll win more rounds) and the nature of it (have many spades? make your bid a spade bid, then you can use them whenever). Then there’s the fact that while you earn points for completing the contract, you naturally lose points if you don’t, since you dictated it.

That regurgitation of my brief learning of the game was satisfying to reinforce my own new knowledge, but it’s incomplete and probably a poor guide for someone else. Oh well, I have thought a lot now.