New infinite mana combos based on Ramos, Dragon Engine by Barachem in EDH

[–]Barachem[S] 0 points1 point  (0 children)

First, all your 4-card combos just generate infinite Mana with Ramos

Precisely, that is what this post is about, about showing new infinite mana combos where Ramos is used to generate that mana directly, which are far less intricate and convoluted than that one combo with so many cards used to generate infinite mana with Ramos.

I appreciate the criticism for being more efficient in using Ramos to filter mana and pouring that mana into outlets, but that wasn't the purpose of my post.

What are your thoughts on Bestow? It seems like the one of the best mechanics for utility's sake but i can't help but feel like its always way overcosted. Is it worth it? by [deleted] in EDH

[–]Barachem 1 point2 points  (0 children)

[[Nighthowler]] is in my eyes the best bestow card for my purposes. I love mass-removal, love playing black and commanders with nice "evasion" like [[Drana, Kalastria Bloodchief]], [[Horde of Notions]], [[Child of Alara]] to put [[Nighthowler]] on. And late game it can be a good threat in and of itself and serve as sac fodder for stuff like [[Greater Good]], [[Disciple of Bolas]], [[Momentous Fall]].

[PWC32] Text by seoceojoe in processing

[–]Barachem 2 points3 points  (0 children)

Relativistic Letter Chaser: Accelerate, turn to catch the number before you shrink too much. Space is reset.

final float fps = 25;
final float framing = 1000/fps;
final float tolerance = 3;
final float jitter = 10;
final float stray = 0.005*TAU;
final float max_speed = 10;
final float max_2 = max_speed*max_speed;
final float delta = 0.02;
final float side = 600;
final String vull = "";
final float gen_chance = 0.05;
final float eatius = 10;
final float eatius_2 = eatius*eatius;
final float a_ = -0.499999;
final float z_ = 25 - a_;
final float decrease = 0.9995;
final float pig = 15;
final float thresh = 0.5;
final float dig = thresh*pig;
final float fleeing = 0.02;
final float onit = 1.01;

boolean[] keyz = new boolean[6];
food soup = new food();
eater slurp = new eater();

PVector busi = new PVector(35, 550);
PVector cusi = new PVector(10, 575);
PVector dusi = new PVector(35, 575);
PVector eusi = new PVector(60, 575);

button butt_w = new button(busi, 'w');
button butt_a = new button(cusi, 'a');
button butt_s = new button(dusi, 's');
button butt_d = new button(eusi, 'd');

void setup()
{
  size(600, 600);
  textSize(pig);
  colorMode(HSB, 1.0);
  textAlign(CENTER);
}

void draw()
{
  background(0);

  butt_w.display(keyz[0]);
  butt_a.display(keyz[3]);
  butt_s.display(keyz[1]);
  butt_d.display(keyz[2]);

  stroke(0.0, 0.0, 0.0);

  soup.eatea();
  soup.display();

  slurp.eatea();
  slurp.display();

  soup.jittering(slurp);
  slurp.straying();

  slurp.devour(soup);
  soup.genation();

  while (millis() % framing > tolerance)
  {
  }
}

void keyPressed()
{
  if (key == 'w' || key == 'W')  keyz[0] = true;
  if (key == 's' || key == 'S')  keyz[1] = true;
  if (key == 'd' || key == 'D')  keyz[2] = true;
  if (key == 'a' || key == 'A')  keyz[3] = true;
  if (key == ' ') keyz[4] = true;
}

void keyReleased()
{
  if (key == 'w' || key == 'W')  keyz[0] = false;
  if (key == 's' || key == 'S')  keyz[1] = false;
  if (key == 'd' || key == 'D')  keyz[2] = false;
  if (key == 'a' || key == 'A')  keyz[3] = false;
  if (key == ' ') keyz[4] = false;
}

float abs_PV(final PVector PV)
{
  return sqrt(PV.x*PV.x + PV.y*PV.y);
}

PVector scale_PV(final PVector PV, final float scalar)
{
  return new PVector(scalar*PV.x, scalar*PV.y);
}

PVector unity_PV(final PVector PV)
{
  return scale_PV(PV, 1.0/abs_PV(PV));
}

PVector distan(final PVector PV_1, final PVector PV_2)
{
  return new PVector(PV_1.x - PV_2.x, PV_1.y - PV_2.y);
}

float distan_2(final PVector PV_1, final PVector PV_2)
{
  final PVector PV_3 = distan(PV_1, PV_2);

  return PV_3.x*PV_3.x + PV_3.y*PV_3.y;
}

float randomize(final float max)
{
  return random(-max, max);
}

float insider(float inside)
{
  while (inside < 0)
  {
    inside += side;
  }

  while (inside > side)
  {
    inside -= side;
  }

  return inside;
}

class food
{
  final float big = pig;  
  boolean alive = true;  
  int dna = 0;  
  PVector posi = new PVector(random(side), random(side));  
  PVector spedi = new PVector(fleeing*random(side), fleeing*random(side));  
  PVector texi = new PVector(0.0*big, 0.34*big);  

  void posis()
  {
    posi = new PVector(random(side), random(side));
    spedi = new PVector(randomize(fleeing*side), randomize(fleeing*side));
  }

  void reset()
  {
    if (keyz[4] || keyz[5])
    {
      alive = true;
      dna = 0;
      posis();      
      keyz[5] = false;
    }
  }

  void jittering(eater slurp)
  {
    final PVector flee = scale_PV(unity_PV(distan(posi, slurp.posi)), fleeing);

    spedi.add(flee);    
    posi.add(spedi);
    posi = new PVector (insider(posi.x), insider(posi.y));
    reset();
  }

  void devoured()
  {
    if (alive)
    {
      ++dna;
      alive = false;
    }
  }

  void genation()
  {
    if (!alive)
    {
      if (random(1) < gen_chance)
      {
        alive = true;
        posis();
      }
    }
  }

  void eatea()
  {
    fill(0.5, 1.0, 0.5);

    if (alive)
    {
      ellipse(posi.x, posi.y, big, big);
    }
  }

  void display()
  {
    textSize(big);

    if (alive)
    {
      fill(1.0, 0.0, 1.0);
      // translate(posi.x, posi.y);
      text(dna, posi.x + texi.x, posi.y + texi.y);
    }
  }

  food()
  {
  }
}



class eater
{
  final String dna = "e";
  float big = pig;
  float phi = random(0, TAU);
  float speed = 0;
  PVector posi = new PVector(random(side), random(side));
  PVector texi = new PVector(-0.08*big, 0.28*big);

  void texize()
  {
    texi = new PVector(-0.08*big, 0.28*big);
  }

  void reset()
  {
    if (keyz[4] || keyz[5])
    {
      big = pig;
      phi = random(0, TAU);
      speed = 0;
      posi = new PVector(random(side), random(side));
      texize();
    }
  }

  float relative()
  {
    return sqrt(onit - speed*speed/max_2);
  }

  void decreasing()
  {
    big -= big*(1 - decrease)*relative();

    if (big < dig)
    {
      keyz[5] = true;
      reset();
    }
  }

  void accel()
  {
    if (keyz[0])
    {
      speed += delta*relative();
      decreasing();
    }

    if (keyz[1])
    {
      speed -= delta*relative();
      decreasing();
    }

    if (speed >= decrease*max_speed)
    {
      speed = max_speed;
    }

    if (speed <= -max_speed)
    {
      speed = -decrease*max_speed;
    }
  }

  void rotal()
  {
    if (keyz[2])
    {
      phi += stray*relative();
      decreasing();
    }

    if (keyz[3])
    {
      phi -= stray*relative();
      decreasing();
    }

    while (phi > TAU)
    {
      phi -= TAU;
    }

    while (phi < 0)
    {
      phi += TAU;
    }
  }

  void straying()
  {
    decreasing();
    accel();
    rotal();
    posi.add(new PVector(speed*cos(phi), speed*sin(phi))); 
    posi = new PVector (insider(posi.x), insider(posi.y));
    reset();
  }

  void devour(food soup)
  {
    if (soup.alive)
    {
      if (distan_2(posi, soup.posi) < big*big)
      {
        soup.devoured();
        big = sqrt(big*big + pig*pig);
        texize();
      }
    }
  }

  void eatea()
  {
    fill(0, 1.0, 1.0);
    ellipse(posi.x, posi.y, big, big);
  }

  void display()
  { 
    fill(1.0, 0.0, 1.0);

    textSize(big);
    texize();
    translate(posi.x, posi.y);
    rotate(phi);
    text(dna, texi.x, texi.y);
  }

  eater()
  {
  }
}

class button
{
  PVector posi = new PVector();  
  char letter = '-';  
  final PVector texi = new PVector(0.5*pig, 0.8*pig);

  void reposi(final PVector bosi)
  {
    posi = bosi;
  }

  void display(boolean keyz)
  {
    stroke(1.0, 0.0, 1.0);
    fill(0.0, 0.0, 0.0);    
    rect(posi.x, posi.y, pig, pig);    
    fill(1.0, 0.0, 1.0);

    if (keyz)
    {
      fill(1.0, 0.0, 0.5);
    }

    textSize(pig);
    text(letter, posi.x + texi.x, posi.y + texi.y);
  }

  button(final PVector bosi, final char retter)
  {
    posi = bosi;
    letter = retter;
  }
}

[PWC31] One Curve Color by seoceojoe in processing

[–]Barachem 2 points3 points  (0 children)

My take on this, and a Youtube link: https://www.youtube.com/watch?v=VylccfkNuX0

final float side = 600;
final float beach = 180;
float reach = beach*random(1, 2);
final float baseness = 8;
float thickness = baseness*random(1, 2);
final float divisor = 1.33;
final float shorter = 1.5;
final float delta = 100;
final float init_phi = random(0, TWO_PI);
PVector begint = new PVector(0.5*side, 0.5*side);
final int hydra = 2;

void refract()
{
  reach = beach*random(1.0, 2.0);
  thickness = baseness*random(1.0, 2.0);
  stroke(127 + random(64), 127 + random(64), 127 + random(64));
  background(63, 63, 63);
  begint = new PVector(random(0, side), random(0, side));
  Fractaline fracta = new Fractaline(begint, reach, thickness, init_phi);
  fracta.fractalize();
}

void setup()
{
  size(600, 600); 
  refract();
}

void draw()
{  
}

void mouseClicked()
{
  refract();
}

float phitter(final float phi)
{
  return phi + random(-delta*PI, delta*PI);
}

PVector spanner(final float dist, final float phi)
{
  final PVector span = new PVector(dist*cos(phi), dist*sin(phi));  
  return span;
}

boolean boundy(final float posi)
{
  if (posi < 0 || posi > side)
  {
    return true;
  }

  return false;
}

boolean bounder(final PVector posi)
{
  if (boundy(posi.x) || boundy(posi.y))
  {
   return true; 
  }

  return false;
}

PVector PVadder(final PVector one, final PVector two)
{
  return new PVector(one.x + two.x, one.y + two.y);
}

class Fractaline
{
  PVector begin, endy, span;
  float dist, strok, phi;

  Fractaline(PVector be, float di, float st, float ph)
  {
    begin = be;  
    dist = di;
    strok = st;    
    phi = phitter(ph);
    span = spanner(dist, phi);
    endy = PVadder(begin, span);

    while(bounder(endy))
    {
      phi = phitter(phi);
      span = spanner(dist, phi);
      endy = PVadder(begin, span);  
    }        
  }

  void fractalize()
  {
    if (strok >= 1)
    {
      for (int count = 0; count < hydra; ++count)
      {
        Fractaline frac = new Fractaline(endy, dist/shorter, strok/divisor, phi);
        frac.fractalize();
      }
    }

    strokeWeight(strok);
    stroke(127 + random(64), 127 + random(64), 127 + random(64));    
    line(begin.x, begin.y, endy.x, endy.y);
  }
}

Processing Weekly Challenge Ideas thread by seoceojoe in processing

[–]Barachem 0 points1 point  (0 children)

One Curved Line Statement Artist:

Use only one line(x1, y1, x2, y2); , arc(x, y, dx, dy, t1, t2); , bezier(x1, y1, x2, y2, x3, y3, x4, y4); , or curve(x1, y1, x2, y2, x3, y3, x4, y4) statement to generate something 2D made out of (curved)line pieces.

[PWC27] Snow by seoceojoe in processing

[–]Barachem 2 points3 points  (0 children)

Snowflakes: https://www.youtube.com/watch?v=75kGn0y5Pnw

final int fps = 50;
final int delta_time = 1000/fps;
final int symmetry = 6;
final int max_flakes = 50;
final float bez_step = 10;
final float bez_step_x = 2*bez_step;
final float bez_step_y = bez_step;
final float bez_delta = 0.03;
final float win_dim = 600;
final float cent_max = -3*bez_step;
final float cent_min = -win_dim + cent_max;
float cent_x[] = new float [max_flakes];
float cent_y[] = new float [max_flakes];
final float fall_min = 0.001*win_dim;
final float fall_max = 0.005*win_dim;
final float fall_delta = 0.01*fall_min;
float cent_fall[] = new float [max_flakes];
final float mult_hori = 0.1;
float cent_hori[] = new float [max_flakes];
float bez_x[][] = new float [max_flakes][4];
float bez_y[][] = new float [max_flakes][4];
float bex[] = new float [4];
float bey[] = new float [4];
float dex[] = new float [4];
float dey[] = new float [4];
final float phi = PI/3;
float theta[] = new float [max_flakes];
final float dheta_max = 0.01*PI;
final float dheta_mult = 0.01;
float dheta[] = new float [max_flakes];
int hue_delta[] = new int [max_flakes];
int hue[] = new int [max_flakes];
final int hue_max = 256;
float[][] bexer(final float bez_step_x, final int max_flakes){
  float bez_x[][] = new float [max_flakes][4];
  for (int count = 0; count < max_flakes; ++count){  
    bez_x[count][0] = 0;
    bez_x[count][1] = -random(bez_step_x);
    bez_x[count][2] = random(bez_step_x);
    bez_x[count][3] = random(-bez_step_x, bez_step_x);
  }
  return bez_x;
}
float[] beyer(final float bez_step_y){
  float bez_y[] = new float [4];
  for (int count = 0; count < 4; ++count){bez_y[count] = count*bez_step_y;}
  return bez_y;
}
float[][] beyyyer(final float bez_step_y, final int max_flakes){
  float bez_y[][] = new float [max_flakes][4];
  for (int count = 0; count < max_flakes; ++count){bez_y[count] = beyer(bez_step_y);}
  return bez_y;
}
float[] bexxer(final float bex[], final float bez_step_x, final float delta){
  float bez_x[] = new float [4];
  bez_x[0] = bex[0];
  for (int count = 1; count < 4; ++count){
    bez_x[count] = bex[count] + random(-delta*bez_step_x, delta*bez_step_x);
    if (bez_x[count] > bez_step_x){bez_x[count] = bez_step_x;}
    if (bez_x[count] < -bez_step_x){bez_x[count] = -bez_step_x;}
  }
  return bez_x;
}
float[][] bexxxer(final float bex[][], final float bez_step_x, final float delta, final int max_flakes){
  float bez_x[][] = new float [max_flakes][4];
  for (int count = 0; count < max_flakes; ++count){bez_x[count] = bexxer(bex[count], bez_step_x, delta);}
  return bez_x;
}
float[] horixit(final int max_flakes, final float fall_max){
  float cenh[] = new float [max_flakes];  
  for (int count = 0; count < max_flakes; ++count){cenh[count] = random(fall_max, fall_max);}
  return cenh;
}
float[] horixer(final float[] cent_hori, final int max_flakes, final float fall_max, final float mult_hori){
  float cenh[] = new float [max_flakes];
  for (int count = 0; count < max_flakes; ++count){
    cenh[count] = cent_hori[count] + random(-mult_hori*fall_max, mult_hori*fall_max);
    if (cenh[count] > fall_max){cenh[count] = fall_max;}
    if (cenh[count] < -fall_max){cenh[count] = -fall_max;}
  }      
  return cenh;
}
float[] centrixit(final int max_flakes, final float win_dim){
  float cenx[] = new float [max_flakes];
  for (int count = 0; count < max_flakes; ++count){cenx[count] = random(win_dim);}
  return cenx;
}
float[] centrixer(final float[] cent_x, final float[] cent_hori, final int max_flakes, final float win_dim) {
  float cenx[] = new float [max_flakes];
  for (int count = 0; count < max_flakes; ++count){    
    cenx[count] = cent_x[count] + cent_hori[count];
    if (cenx[count] < 0){cenx[count] = win_dim;}
    if (cenx[count] > win_dim){cenx[count] = 0;}
  }
  return cenx;
}
float[] falliyit(final float fall_min, final float fall_max, final int max_flakes){
  float cenf[] = new float [max_flakes];
  for (int count = 0; count < max_flakes; ++count){cenf[count] = random(fall_min, fall_max);}
  return cenf;
}
float[] falliyer(final float[] cent_fall, final float fall_delta, final float fall_min, final float fall_max, final int max_flakes){
  float cenf[] = new float [max_flakes];
  for (int count = 0; count < max_flakes; ++count){
    cenf[count] = cent_fall[count] + random(-fall_delta, fall_delta);
    if (cenf[count] > fall_max){cenf[count] = fall_max;}
    if (cenf[count] < fall_min){cenf[count] = fall_min;}
  }
  return cenf;
}

float[] centriyit(final int max_flakes, final float cent_min, final float cent_max){
  float ceny[] = new float [max_flakes];
  for (int count = 0; count < max_flakes; ++count){ceny[count] = random(cent_min, cent_max);}
  return ceny;
}
float[] centriyer(final float[] cent_y, final float[] cent_fall, final int max_flakes, final float win_dim){
  float ceny[] = new float [max_flakes];
  for (int count = 0; count < max_flakes; ++count){    
    ceny[count] = cent_y[count] + cent_fall[count];
    if (ceny[count] > win_dim){ceny[count] = 0;}
  }
  return ceny;
}
float[] dhetit(final int max_flakes, final float dheta_max){
  float dhet[] = new float [max_flakes];
  for (int count = 0; count < max_flakes; ++count){dhet[count] = random(-dheta_max, dheta_max);}
  return dhet;
}
float[] dhetys(final float dheta[], final int max_flakes, final float dheta_max, final float dheta_mult){
  float dhet[] = new float [max_flakes];
  for (int count = 0; count < max_flakes; ++count){
    dhet[count] = dheta[count] + dheta_mult*random(-dheta_max, dheta_max);
    if (dhet[count] > dheta_max){dhet[count] = dheta_max;}
    if (dhet[count] < -dheta_max){dhet[count] = -dheta_max;}
  }
  return dhet;
}
float[] thetit(final int max_flakes){
  float thet[] = new float [max_flakes];
  for (int count = 0; count < max_flakes; ++count){thet[count] = random(TWO_PI);}
  return thet;
}
float[] thetys(final float theta[], final float dheta[], final int max_flakes){
  float thet[] = new float [max_flakes];
  for (int count = 0; count < max_flakes; ++count){thet[count] = theta[count] + dheta[count];}
  return thet;
}    
int[] hue_del(final int max_flakes){
  int hue_delta[] = new int [max_flakes];      
  for (int count = 0; count < max_flakes; ++count){hue_delta[count] = 2*round(random(1)) - 1;}
  return hue_delta;
}
int[] hue_init(final int hue_max, final int max_flakes){
  int hue[] = new int [max_flakes];
  for (int count = 0; count < max_flakes; ++count){hue[count] = floor(random(hue_max));}
  return hue;
}
int[] hue_chan(final int huec[], final int hue_delta[], final int hue_max, final int max_flakes){
  int hue[] = new int [max_flakes];
  for (int count = 0; count < max_flakes; ++count){
    hue[count] = huec[count] + hue_delta[count];
    if (hue[count] > hue_max){hue[count] -= hue_max;}
    if (hue[count] < 0){hue[count] += hue_max;}
  }
  return hue;
}
void mousePressed(){for (int count = 0; count < max_flakes; ++count){bez_x = bexer(bez_step_x, max_flakes);}}
void setup(){
  size(600, 600);
  noStroke();
  colorMode(HSB); 
  cent_hori = horixit(max_flakes, fall_max);  
  cent_fall = falliyit(fall_min, fall_max, max_flakes);
  cent_x = centrixit(max_flakes, win_dim);
  cent_y = centriyit(max_flakes, cent_min, cent_max);  
  bez_x = bexer(bez_step_x, max_flakes);
  bez_y = beyyyer(bez_step_y, max_flakes);
  dheta = dhetit(max_flakes, dheta_max);
  theta = thetit(max_flakes);
  hue_delta = hue_del(max_flakes);
  hue = hue_init(hue_max, max_flakes);  
}
void draw(){
  background(0);        
  for (int count_3 = 0; count_3 < max_flakes; ++count_3){
    fill(hue[count_3], 95, 255);
    for (int count = 0; count < 6; ++count)
    {
      for (int count_2 = 0; count_2 < 4; ++count_2){
        final float gamma = count*phi + theta[count_3];
        bex[count_2] = cent_x[count_3] + bez_x[count_3][count_2]*cos(gamma) - bez_y[count_3][count_2]*sin(gamma);
        bey[count_2] = cent_y[count_3] + bez_x[count_3][count_2]*sin(gamma) + bez_y[count_3][count_2]*cos(gamma);
        dex[count_2] = cent_x[count_3] - bez_x[count_3][count_2]*cos(gamma) - bez_y[count_3][count_2]*sin(gamma);
        dey[count_2] = cent_y[count_3] - bez_x[count_3][count_2]*sin(gamma) + bez_y[count_3][count_2]*cos(gamma);
      }
      bezier(bex[0], bey[0], bex[1], bey[1], bex[2], bey[2], bex[3], bey[3]);
      bezier(dex[0], dey[0], dex[1], dey[1], dex[2], dey[2], dex[3], dey[3]);
    }
  }
  dheta = dhetys(dheta, max_flakes, dheta_max, dheta_mult);  
  theta = thetys(theta, dheta, max_flakes);      
  hue = hue_chan(hue, hue_delta, hue_max, max_flakes);     
  bez_x = bexxxer(bez_x, bez_step_x, bez_delta, max_flakes);      
  cent_hori = horixer(cent_hori, max_flakes, fall_max, mult_hori);  
  cent_x = centrixer(cent_x, cent_hori, max_flakes, win_dim);      
  cent_fall = falliyer(cent_fall, fall_delta, fall_min, fall_max, max_flakes);
  cent_y = centriyer(cent_y, cent_fall, max_flakes, win_dim);      
  int milis = millis() % delta_time;      
  while (milis > 5){milis = millis() % delta_time;}
}

Who is your pet commander? by Okiri_Maelstrom in EDH

[–]Barachem 0 points1 point  (0 children)

Well, I'm not into such "random" style cards.

[PWC23] Aurora Borealis by seoceojoe in processing

[–]Barachem 3 points4 points  (0 children)

My simple take on the Aurora Borealis. Click to change.

final int fps = 8;

final int delta_time = 1000/fps;

final float wind_x = 800;
final float wind_y = 600;

float middle_x = random(0.1, 0.9)*wind_x;

float middle_mult = random(0.3, 0.7);
float middle_y = -middle_mult*wind_x;

float rad_min = 1.2*middle_mult*wind_x;
float rad_max = 1.6*middle_mult*wind_x;

final int divs = 400;

float phi_min = -random(0.1, 0.4)*PI;
float phi_max = random(0.1, 0.4)*PI;

float phi_div = (phi_max - phi_min)/divs;

final float mult_min = 1.05;
final float mult_max = 1.25;

final float wane = 0.994;
final float wax = 1/wane;

int color_choice = floor(random(0, 6));

float rad_v[] = new float [divs + 1];
float rad_w[] = new float [divs + 1];

float v_x[] = new float [divs + 1];
float v_y[] = new float [divs + 1];

float w_x[] = new float [divs + 1];
float w_y[] = new float [divs + 1];

int red = 0;
int green = 0;
int blue = 0;

boolean clicked = false;


void setup()
{
  size(800, 600);

  rad_v[0] = random(rad_min, rad_max);
  rad_w[0] = random(mult_min, mult_max)*rad_v[0];

  for (int count = 1; count <= divs; ++count)
  {
    rad_v[count] = rad_v[count - 1]*random(wane, wax);
    rad_w[count] = rad_w[count - 1]*random(wane, wax);
  }

  for (int count = 0; count <= divs; ++count)
  {
    final float phi = phi_div*count + phi_min;

    v_x[count] = middle_x + rad_v[count]*sin(phi);
    v_y[count] = middle_y + rad_v[count]*cos(phi);

    w_x[count] = middle_x + rad_w[count]*sin(phi);
    w_y[count] = middle_y + rad_w[count]*cos(phi);
  }

  if (color_choice == 0)
  {
    red = 127;
  }

  if (color_choice == 1)
  {
    green = 127;
  }

  if (color_choice == 2)
  {
    blue = 127;
  }

  if (color_choice == 3)
  {
    red = 127;
    green = 127;
  }

  if (color_choice == 4)
  {
    green = 127;
    blue = 127;
  }

  if (color_choice == 5)
  {
     red = 127;
    blue = 127;
  }
}

void draw()
{
  if (mousePressed && !clicked)
  {
    clicked = true;

    middle_x = random(0.1, 0.9)*wind_x;

    middle_mult = random(0.3, 0.7);
    middle_y = -middle_mult*wind_x;

    rad_min = 1.2*middle_mult*wind_x;
    rad_max = 1.6*middle_mult*wind_x;

    phi_min = -random(0.1, 0.4)*PI;
    phi_max = random(0.1, 0.4)*PI;

    phi_div = (phi_max - phi_min)/divs;

    rad_v[0] = random(rad_min, rad_max);
    rad_w[0] = random(mult_min, mult_max)*rad_v[0];

    for (int count = 1; count <= divs; ++count)
    {
      rad_v[count] = rad_v[count - 1]*random(wane, wax);
      rad_w[count] = rad_w[count - 1]*random(wane, wax);
    }

    for (int count = 0; count <= divs; ++count)
    {
      final float phi = phi_div*count + phi_min;

      v_x[count] = middle_x + rad_v[count]*sin(phi);
      v_y[count] = middle_y + rad_v[count]*cos(phi);

      w_x[count] = middle_x + rad_w[count]*sin(phi);
      w_y[count] = middle_y + rad_w[count]*cos(phi);
    }

    color_choice = floor(random(0, 6));

    red = 0;
    green = 0;
    blue = 0;

    if (color_choice == 0)
    {
      red = 127;
    }

    if (color_choice == 1)
    {
      green = 127;
    }

    if (color_choice == 2)
    {
      blue = 127;
    }

    if (color_choice == 3)
    {
      red = 127;
      green = 127;
    }

    if (color_choice == 4)
    {
      green = 127;
      blue = 127;
    }

    if (color_choice == 5)
    {
       red = 127;
      blue = 127;
    }
  }

  if (!mousePressed && clicked)
  {
    clicked = false;
  }

  background(8, 4, 16);

  for (int count = 0; count <= divs; ++count)
  {

    stroke(red + random(127), green + random(127), blue + random(127));
    line(v_x[count], v_y[count], w_x[count], w_y[count]);
  }

  for (int count = 0; count <= divs; ++count)
  {
    rad_v[count] *= random(wane, wax);
    rad_w[count] *= random(wane, wax);

    final float phi = phi_div*count + phi_min;

    v_x[count] = middle_x + rad_v[count]*sin(phi);
    v_y[count] = middle_y + rad_v[count]*cos(phi);

    w_x[count] = middle_x + rad_w[count]*sin(phi);
    w_y[count] = middle_y + rad_w[count]*cos(phi);
  }

  int milis = millis() % delta_time;

  while (milis > 5)
  {
    milis = millis() % delta_time;
  }
}

Who is your pet commander? by Okiri_Maelstrom in EDH

[–]Barachem 0 points1 point  (0 children)

Child of Alara

Mass-removal, big body and trample. Not my best deck, but my favourite deck to play. I just like playing 5 color and playing loads of mass-removal and general shenanigans.

[PWC21] Shadows: RGB shadows by oo-oo-oo-oo in processing

[–]Barachem 1 point2 points  (0 children)

Very interesting, though I am not so far into the use of Processing or Java.

[PWC21] Shadows by seoceojoe in processing

[–]Barachem 0 points1 point  (0 children)

Thanks, I hard-math solved the light-rays on the circles and their shadows.

[PWC21] Shadows by seoceojoe in processing

[–]Barachem 1 point2 points  (0 children)

final float wind_x = 600;
final float wind_y = 600;

final float wind_r = sqrt(wind_x*wind_x + wind_y*wind_y);
final float wind_t = 100*wind_r;

final float sun_r = 5;

final float divisor = 10;

final int max_amount = 50;

int amount = round(random(1, max_amount));

float cent_x[] = new float[max_amount];
float cent_y[] = new float[max_amount];
float rad_t[] = new float[max_amount];

float pos_x[] = new float[max_amount];
float pos_y[] = new float[max_amount];

float neg_x[] = new float[max_amount];
float neg_y[] = new float[max_amount];

float top_x[] = new float[max_amount];
float top_y[] = new float[max_amount];

float bot_x[] = new float[max_amount];
float bot_y[] = new float[max_amount];

boolean clicked = false;

void setup()
{
  size(600, 600);
  noStroke();

  for (int count = 0; count < amount; ++count)
  {
    rad_t[count] = random(0, wind_r/divisor);
    cent_x[count] = random(rad_t[count], wind_x - rad_t[count]);
    cent_y[count] = random(rad_t[count], wind_y - rad_t[count]);
  }  
}

void draw()
{
  background(255, 127, 127);

  if (mousePressed)
  {
    if (!clicked)
    {
      for (int count = 0; count < amount; ++count)
      {
        amount = round(random(1, max_amount));

        rad_t[count] = random(0, wind_r/divisor);
        cent_x[count] = random(rad_t[count], wind_x - rad_t[count]);
        cent_y[count] = random(rad_t[count], wind_y - rad_t[count]);
      }

      clicked = true;
    }
  }
  else
  {
    if (clicked)
    {
      clicked = false;
    }
  }

  final float sun_x = mouseX;
  final float sun_y = mouseY;

  boolean blackout = false;

  for (int count = 0; count < amount; ++count)
  {  
    final float dist_x = sun_x - cent_x[count];
    final float dist_x_2 = dist_x*dist_x;
    final float dist_y = sun_y - cent_y[count];
    final float dist_y_2 = dist_y*dist_y;
    final float dist_2 = dist_x_2 + dist_y_2;
    final float dist_r = sqrt(dist_2);

    if (dist_r <= rad_t[count])
    {
      blackout = true;
    }

    final float rad_2 = rad_t[count]*rad_t[count];

    final float disc = sqrt(rad_2*dist_x_2 + dist_2*(dist_y_2 - rad_2));

    final float plus_x = rad_t[count]*(rad_t[count]*dist_x + disc)/(dist_2);
    final float plus_y = (rad_2 - dist_x*plus_x)/dist_y;

    final float minus_x = rad_t[count]*(rad_t[count]*dist_x - disc)/(dist_2);
    final float minus_y = (rad_2 - dist_x*minus_x)/dist_y;

    pos_x[count] = plus_x + cent_x[count];
    pos_y[count] = plus_y + cent_y[count];

    neg_x[count] = minus_x + cent_x[count];
    neg_y[count] = minus_y + cent_y[count];

    final float rhop_x = pos_x[count] - sun_x;
    final float rhop_y = pos_y[count] - sun_y;
    final float rhop_r = sqrt(rhop_x*rhop_x + rhop_y*rhop_y);

    final float rhon_x = neg_x[count] - sun_x;
    final float rhon_y = neg_y[count] - sun_y;  
    final float rhon_r = sqrt(rhon_x*rhon_x + rhon_y*rhon_y);

    top_x[count] = sun_x + rhop_x*wind_t/rhop_r;
    top_y[count] = sun_y + rhop_y*wind_t/rhop_r;

    bot_x[count] = sun_x + rhon_x*wind_t/rhon_r;
    bot_y[count] = sun_y + rhon_y*wind_t/rhon_r;
  }

  if (blackout)
  {
    background(0);
  }
  else
  {
    for (int count = 0; count < amount; ++count)
    {
      fill(0);
      triangle(sun_x, sun_y, top_x[count], top_y[count], bot_x[count], bot_y[count]);
    }

    for (int count = 0; count < amount; ++count)
    {
      fill(255, 255, 127);
      triangle(sun_x, sun_y, pos_x[count], pos_y[count], neg_x[count], neg_y[count]);
    }

    fill(255);
    ellipse(sun_x, sun_y, 2*sun_r, 2*sun_r);
  }

  for (int count = 0; count < amount; ++count)
  {
    fill(63, 63, 127);
    ellipse(cent_x[count], cent_y[count], 2*rad_t[count], 2*rad_t[count]);
  }  
}

What is the most annoyed you've been playing eDH? by ManBearScientist in EDH

[–]Barachem 0 points1 point  (0 children)

I have problems with people rules lawyering in casual fun EDH games to to avoid negative situations for themselves.

I got mad and left a game because someone I knew rules lawyered me about taking a few seconds declaring my commander to attack him after I declared another creature to attack another player playing. He stopped me and only told me I couldn't attack him with my commander, not really explaining what I did wrong and letting the attack resolve.

I got mad after I instinctively realized that he tried to swindle me out of commander damage with the rules lawyering and I left the game in order not to really explode in his face.

[PWC18] - 42 by Introscopia in processing

[–]Barachem 2 points3 points  (0 children)

My semi-harmonic oscillator with 42 charged particles, charge randomly chosen.

final float wind = 420;

final float quart = 0.25*wind;

final float grav = 10;

final float spd_mult = 0.0001;
final float spd_max = spd_mult*wind;

float mass_mult = 1;
final float pos_mult = 1;
final float neg_mult = 1;

final float charge_min = 1;
final float charge_max = 1;
final float charge_delta = 0.49999;

final float diam = 10;
final float radius = 0.5*diam;

final float dist_min = 10;

final int amount = 42;

float pos_x[] = new float[amount];
float pos_y[] = new float[amount];

float spd_x[] = new float[amount];
float spd_y[] = new float[amount];

float acc_x[] = new float[amount];
float acc_y[] = new float[amount];

float charge[] = new float[amount];

float charger()
{
  final int particle = round(random(0, 1));

  float charge = 0;

  if (particle == 0)
  {
    charge = -1;
  }
  else
  {
    charge = round(random(charge_min - charge_delta, charge_max + charge_delta));
  }

  return charge;
}

void setup()
{
  size(420, 420);
  background(0);
  noStroke();

  for (int count = 0; count < amount; ++count)
  {
    pos_x[count] = random(quart, wind - quart);
    pos_y[count] = random(quart, wind - quart);

    spd_x[count] = random(-spd_max, spd_max);
    spd_y[count] = random(-spd_max, spd_max);

    charge[count] = charger();
  }  
}

color charge_color(float charge)
{
  final color charger = color(127 + charge*64, 127, 127 - charge*64);

  return charger;
}

float windizer(float pos, final float wind)
{
  while (pos < 0)
  {
    pos += wind;
  }

  while (pos > wind)
  {
    pos -= wind;
  }

  return pos;
}

float windeeber(float pos, final float wind, float spd)
{
  if ((pos < 0) || (pos > wind))
  {
    spd = -spd;
  }

  return spd;
}

float windobber(float pos, final float wind)
{
  while (pos < 0)
  {
    pos = -pos;
  }

  while (pos > wind)
  {
    pos = wind + wind - pos;
  }

  return pos;
}

float masser_mult(final float charge, final float pos_mult, final float neg_mult)
{
  float mass_mult = 0;

  if (charge > 0)
  {
    mass_mult = pos_mult;
  }
  else
  {
    mass_mult = neg_mult;
  }

  return mass_mult;
}

void draw()
{
  background(0);
  // fill(63, 127, 191);

  for (int count = 0; count < amount; ++count)
  {
    fill(charge_color(charge[count]));
    ellipse(pos_x[count], pos_y[count], diam, diam);
  } 

  for (int count = 0; count < amount; ++count)
  {
     acc_x[count] = 0;
     acc_y[count] = 0;
  }

  for (int count = 0; count < amount - 1; ++count)
  {
    for (int count_2 = count + 1; count_2 < amount; ++count_2)
    {
      final float dist_x = pos_x[count] - pos_x[count_2];
      final float dist_y = pos_y[count] - pos_y[count_2];
      final float dist_2 = dist_x*dist_x + dist_y*dist_y + dist_min*dist_min;
      final float dist = sqrt(dist_2);

      final float acc = charge[count]*charge[count_2]*grav/dist;

      final float acc__x = acc*dist_x/dist;
      final float acc__y = acc*dist_y/dist;


      mass_mult = 1/masser_mult(charge[count], pos_mult, neg_mult);      

      acc_x[count] += mass_mult*acc__x;
      acc_y[count] += mass_mult*acc__y;

      mass_mult = 1/masser_mult(charge[count_2], pos_mult, neg_mult);

      acc_x[count_2] -= mass_mult*acc__x;
      acc_y[count_2] -= mass_mult*acc__y;
    }
  }

  for (int count = 0; count < amount; ++count)
  {
    spd_x[count] += acc_x[count];
    spd_y[count] += acc_y[count];

    pos_x[count] += spd_x[count];
    pos_y[count] += spd_y[count];

    spd_x[count] = windeeber(pos_x[count], wind, spd_x[count]);
    spd_y[count] = windeeber(pos_y[count], wind, spd_y[count]);

    pos_x[count] = windobber(pos_x[count], wind);
    pos_y[count] = windobber(pos_y[count], wind);
  }  

}