unexpected token:void
in
Programming Questions
•
3 years ago
I can't find the error here!
import processing.dxf.*;
import controlP5.*;
import peasy.org.apache.commons.math.*;
import peasy.*;
import peasy.org.apache.commons.math.geometry.*;
import processing.opengl.*;
import traer.physics.*;
import javax.media.opengl.*;
import nervoussystem.obj.*;
GL gl;
PGraphicsOpenGL pgl;
PGraphics mySave;
float fMag = .05;
float K = .2;
float D = 1.5;
float rest = .3;
float tick = .1;
float scaler = 5;
int controlHeight = 500;
int controlWidth = 200;
//data structures
ParticleSystem pSys = new ParticleSystem(0,.25);
Spring[] springs = new Spring[0];
ArrayList forces = new ArrayList();
MyParticle[] particles = new MyParticle[0];
Spring[] springs2 = new Spring[0];
MyParticle[] particles2 = new MyParticle[0];
ControlP5 cp5;
ControlGroup menu;
//all have to be even
int x_divs = 22;//14 //30 radial divisions on inside and outside
int y_divs = 8; // 6 vertical divisions outside
int y_divs2 = 10; //vertical divisions inside
MyParticle grid[][];
MyParticle grid2[][];
Face faces[] = new Face[0];
Face faces2[] = new Face[0];
ArrayList shape_outline = new ArrayList();
PGraphics3D pg;
//initial ring shape in mm
//small 35.2
//medium 35.65
//large 38.32
float rad = 38.32;//10 //18
float prad = rad;
float minZ = -15;
float maxZ = 15; // 30 35
float pmaxZ = maxZ;
//to deform boundarys
float amp1 = 0;//8
float amp2 = 0;//8
float pamp1 = amp1;
float pamp2 = amp2;
float phase = 0;
float pPhase = phase;
float phase2 = PI/2;
float pPhase2 = phase2;
int freq1 = 2;
int freq2 = 2;//1
int pFreq1 = freq1;
int pFreq2 = freq2;//1
float pow1 = 2;
float pPow1 = pow1;
float pow2 = 2;
int twist = 0;
float cTwist = 0;
float pTwist = 0;
float thickness = 2.55; //thicknesss of biggest members 2.05
float minThick = 1.0;
//donut control, smaller less donuty
float rScale=.5; //outside 1
float rScale2=.5; //inside .5
float rSep = 3; //separation between two layers
int maxGen = 3; //max number of subdivisions
//variables
boolean paused = false;
boolean record = false;
int view = 0;
boolean preview = false;
boolean build = false;
boolean drawDimensions = true;
float view_offset=0;
PeasyCam camera1;
boolean cameraListen = true;
String[] output;
int outLine = 0;
runPSys rps;
color bg; //background color
float meshVolume = 0;
float price = 0;
float innerDiameter = 0;
float outerDiameter = 0;
float totalHeight = 0;
PVector appCenter = new PVector();
PFont mFont;
String saveFile = "";
void setup() {
import processing.dxf.*;
import controlP5.*;
import peasy.org.apache.commons.math.*;
import peasy.*;
import peasy.org.apache.commons.math.geometry.*;
import processing.opengl.*;
import traer.physics.*;
import javax.media.opengl.*;
import nervoussystem.obj.*;
GL gl;
PGraphicsOpenGL pgl;
PGraphics mySave;
float fMag = .05;
float K = .2;
float D = 1.5;
float rest = .3;
float tick = .1;
float scaler = 5;
int controlHeight = 500;
int controlWidth = 200;
//data structures
ParticleSystem pSys = new ParticleSystem(0,.25);
Spring[] springs = new Spring[0];
ArrayList forces = new ArrayList();
MyParticle[] particles = new MyParticle[0];
Spring[] springs2 = new Spring[0];
MyParticle[] particles2 = new MyParticle[0];
ControlP5 cp5;
ControlGroup menu;
//all have to be even
int x_divs = 22;//14 //30 radial divisions on inside and outside
int y_divs = 8; // 6 vertical divisions outside
int y_divs2 = 10; //vertical divisions inside
MyParticle grid[][];
MyParticle grid2[][];
Face faces[] = new Face[0];
Face faces2[] = new Face[0];
ArrayList shape_outline = new ArrayList();
PGraphics3D pg;
//initial ring shape in mm
//small 35.2
//medium 35.65
//large 38.32
float rad = 38.32;//10 //18
float prad = rad;
float minZ = -15;
float maxZ = 15; // 30 35
float pmaxZ = maxZ;
//to deform boundarys
float amp1 = 0;//8
float amp2 = 0;//8
float pamp1 = amp1;
float pamp2 = amp2;
float phase = 0;
float pPhase = phase;
float phase2 = PI/2;
float pPhase2 = phase2;
int freq1 = 2;
int freq2 = 2;//1
int pFreq1 = freq1;
int pFreq2 = freq2;//1
float pow1 = 2;
float pPow1 = pow1;
float pow2 = 2;
int twist = 0;
float cTwist = 0;
float pTwist = 0;
float thickness = 2.55; //thicknesss of biggest members 2.05
float minThick = 1.0;
//donut control, smaller less donuty
float rScale=.5; //outside 1
float rScale2=.5; //inside .5
float rSep = 3; //separation between two layers
int maxGen = 3; //max number of subdivisions
//variables
boolean paused = false;
boolean record = false;
int view = 0;
boolean preview = false;
boolean build = false;
boolean drawDimensions = true;
float view_offset=0;
PeasyCam camera1;
boolean cameraListen = true;
String[] output;
int outLine = 0;
runPSys rps;
color bg; //background color
float meshVolume = 0;
float price = 0;
float innerDiameter = 0;
float outerDiameter = 0;
float totalHeight = 0;
PVector appCenter = new PVector();
PFont mFont;
String saveFile = "";
void setup() {
1