Skip to content

[Brainstorming Archive] Paul Proposal

Paul Bardea edited this page May 1, 2018 · 1 revision

Preface

I have pretty much no background in art other than grade 9 visual arts, working my way half-through an online drawing course, and an attempt at styling websites. Please take that into account while reviewing this proposal. What I mean by that is my intuition into how experienced artists think and generally see the world may be very different from what I'm proposing. In that light I'm going to approach the topic from a more technical point of view and work my way from there.

Another note: The language semantics proposed here attempt to be language agnostic. I am not particularily looking into specific syntactical features but rather exploring potential concepts.

Getting Oriented

The first thing I think about when visualizing things in 3D is a frame of reference. I would like to know which way is up, which way is the positive X direction, and what scale I'm operating at. I think we can make this clear if we take advantage of the interactive/quick-feedback UI and set up a dev mode. The coordinate system would be shown when this dev mode would be turned on.

main {
    DEBUG = true
}

I think it would be interesting to consider if every shape would have it's own coordinate system in the space. Then objects can be merged together. So a child object would be merged into its parent and the child would be translated into the parent's frame of reference automatically. Then when applying the transformations described below, those transformations would be in terms of that object's frame of reference.

Introducing shapes

The way I am envisioning to using the programming language would be similar to sculpting in the real world. (Please take into account that I have not done anything even resembling scuplting in the last 10 years, and most my sculpting knowledge comes from a wikihow article I read 10 minutes ago.) I would start off with a shape, let's say a sphere. Then using this base shape I would either:

Apply a classical geometrical transformation

  • Move it (translate)
  • Rotate it (rotate)
  • Stretch it (scale)

or Modify the object itself

  • Carve into it
  • Merge another shape into/onto it

The easiest way I found to describe this would be via a code example:

main {
    head_diameter = 10
    // Create a new sphere at the origin.
    head = Sphere(diameter)

    head.move(up: 10, right: 10) // translation
    // default unit would be rad
    // degrees here is an enum defined by our library
    head.rotate(unit: DEGREES, x: 180, z: 10) // rotation
    head.stretch(x: 0.5, y: 2) // scale

    ear_diameter = 2
    ear = Sphere(ear_diameter)
    ear.rotate(x: PI/2)
    ear.stretch(x: 2)
    head.join(ear, at: (x, y, z)) // joining two objects
    // OR
    head.carve(ear, at: (x, y, z)) // sculpting
}