Skip to main content

Command Palette

Search for a command to run...

WCCC_Mapping

Mapping Terrain

Updated
2 min read
WCCC_Mapping

Mount-Ifskald

For this week's Creative Code challenge by @sableRaph: Mapping”, Mount-Ifskald takes a 3D Graph in Python & coded audio in SonicPi to map a mountain that hasn’t been seen before.

Poetry

Inspecting Mount-Ifskald & Mapping
The Elevation of this new Area
Seeking what are the new criterias
Adding, Grabbing & Padded
The Necessary Points
For the Mapping of Mount-Ifskald to bring new Joints

Video

Code

Python

#plotting points to Map a new Terrain

import random as rd
import numpy as np
import seaborn as sns
import matplotlib.pylab as plt

import plotly.graph_objects as go

def plotPoints(rangeChange):
    #probability with the points

    #making a 12 point random value
    points = random_floats_list = [valuePoints()/rangeChange for _ in range(12)]

    #probability array
    prob = [0.025,0.025,0.05,0.05,0.05,0.05,0.1,0.1,0.1,0.1,0.2,0.15]

    #3 Arrays, 450 Points with shuffling the probability 
    pointsPlot = np.random.choice(points, (3,450), p=rd.shuffle(prob))
    return  pointsPlot


#random values
def valuePoints():
    valueRand = rd.uniform(-320.5, 130.0)
    return valueRand

#Plotting/Mapping


fig = go.Figure() #to be able to trace

fig.add_trace(go.Mesh3d(x=(plotPoints(2)[0]),
                   y=(plotPoints(2)[1]),
                   z=(plotPoints(0.75)[2]),
                   opacity=0.5,
                   color = "salmon"
                  ))

fig.add_trace(go.Mesh3d(x=(plotPoints(2)[0]),
                   y=(plotPoints(0.95)[1]),
                   z=(plotPoints(0.75)[2]),
                   opacity=0.35,
                   color = "white"
                  ))

fig.add_trace(go.Mesh3d(x=(plotPoints(1)[0]),
                   y=(plotPoints(0.95)[1]),
                   z=(plotPoints(0.75)[2]),
                   opacity=0.45,
                   color = "yellow"
                  ))

fig.update_layout(
    scene = dict(
        xaxis = dict(nticks=4, range=[-270,270],backgroundcolor="chocolate",gridcolor="white"),
                     yaxis = dict(nticks=4, range=[-270,270],backgroundcolor="grey",gridcolor="red"),
                     zaxis = dict(nticks=4, range=[-270,270],backgroundcolor="black",gridcolor="gold"),),
    width=700,
    margin=dict(r=20, l=10, b=10, t=10))

fig.show()

SonicPi

live_loop :innersoul do
  use_random_seed Time.now.to_i / 3
  with_fx :ping_pong, mix: rrand(0.25,0.76) do
    with_fx :echo do
      use_bpm 40
      sample [:drum_bass_soft,:elec_beep].choose,rate: [0.5,1,-1,-0.5].choose, beat_stretch: [3.6,1,2].choose
    end
    sleep [0.5,1,2,4,8,12,16].choose
  end
end


live_loop :outersoul do
  use_random_seed Time.now.to_i / 2
  with_fx [:echo,:ixi_techno].choose, mix: rrand(0,0.75) do
    use_bpm 120
    sample [:ambi_glass_hum,:perc_snap2].choose,rate: [0.5,1,-1,-0.5].choose, beat_stretch: [3.6,1,2].choose
  end
  sleep [0.25,0.5,1,2,4].choose
end

live_loop :voicesofOthers do
  use_random_seed Time.now.to_i / 4
  with_fx :vowel, voice: dice(4) do
    use_bpm [90,270,135,6].choose
    sample [:ambi_glass_hum,:perc_snap2].choose,rate: [0.5,1,-1,-0.5].choose, beat_stretch: [3.6,1,2].choose
  end
  sleep [0.25,0.5,1].choose
end

WCCChallenge

Part 24 of 50

Submissions to the WCCChallenge

Up next

WCCC_Campfire

Digital Artifacts Burning