commit
70bbc89239
@ -0,0 +1,89 @@
|
||||
package visualiser.layout;
|
||||
|
||||
import com.sun.corba.se.impl.orbutil.graph.Graph;
|
||||
import javafx.scene.shape.Box;
|
||||
import javafx.scene.shape.MeshView;
|
||||
import javafx.scene.shape.Rectangle;
|
||||
import javafx.scene.shape.Sphere;
|
||||
import shared.model.GPSCoordinate;
|
||||
import visualiser.model.GraphCoordinate;
|
||||
import visualiser.utils.GPSConverter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Class that creates a 3d boundary based on gps coordinates
|
||||
*/
|
||||
public class Boundary3D {
|
||||
|
||||
public static double thickness = 1;
|
||||
private List<Subject3D> boundaryNodes = new ArrayList<>();
|
||||
private List<Subject3D> boundaryConnectors = new ArrayList<>();
|
||||
private GPSConverter gpsConverter;
|
||||
|
||||
public Boundary3D(List<GPSCoordinate> points, GPSConverter gpsConverter){
|
||||
this.gpsConverter = gpsConverter;
|
||||
setBoundaryNodes(points);
|
||||
}
|
||||
|
||||
/**
|
||||
* Splits up the list so that it generates a edge of the boundary
|
||||
* @param points boundary gpscoordinate
|
||||
*/
|
||||
private void setBoundaryNodes(List<GPSCoordinate> points){
|
||||
if (points.size() < 2){
|
||||
return;
|
||||
}
|
||||
System.out.println(points.size());
|
||||
for (int i = 0; i < points.size(); i++){
|
||||
if (i + 1 != points.size()){
|
||||
addBound(points.get(i), points.get(i + 1));
|
||||
} else {
|
||||
addBound(points.get(i), points.get(0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a two point boundary this will create a sphere at coord1 and a line to coord 2
|
||||
* this is to reduce double up (2 spheres in one point).
|
||||
* @param coord1 point to make sphere and start the line.
|
||||
* @param coord2 point to end the line.
|
||||
*/
|
||||
private void addBound(GPSCoordinate coord1, GPSCoordinate coord2){
|
||||
GraphCoordinate graphCoord1 = gpsConverter.convertGPS(coord1);
|
||||
GraphCoordinate graphCoord2 = gpsConverter.convertGPS(coord2);
|
||||
GraphCoordinate avgCoord = new GraphCoordinate((graphCoord1.getX() + graphCoord2.getX()) / 2,
|
||||
(graphCoord1.getY() + graphCoord2.getY()) / 2);
|
||||
|
||||
double a = (graphCoord1.getX() - graphCoord2.getX());
|
||||
double b = (graphCoord1.getY() - graphCoord2.getY());
|
||||
double c = Math.sqrt(a * a + b * b);
|
||||
|
||||
|
||||
Subject3D bound1 = new Subject3D(new Sphere(thickness * 2));
|
||||
bound1.setX(graphCoord1.getX());
|
||||
bound1.setZ(graphCoord1.getY());
|
||||
boundaryNodes.add(bound1);
|
||||
|
||||
Subject3D connector = new Subject3D(new Box(c, thickness, thickness));
|
||||
connector.setX(avgCoord.getX());
|
||||
connector.setZ(avgCoord.getY());
|
||||
double angle = 90 + Math.toDegrees(GPSConverter.getAngle(graphCoord2, graphCoord1));
|
||||
connector.setHeading(angle);
|
||||
|
||||
boundaryConnectors.add(connector);
|
||||
}
|
||||
|
||||
/**
|
||||
* get the 3d objects to draw
|
||||
* @return 3d boundary to draw
|
||||
*/
|
||||
public List<Subject3D> getBoundaryNodes(){
|
||||
//these two must be concatenated with nodes after connectors else the spheres will not overlap the lines
|
||||
ArrayList<Subject3D> result = new ArrayList<>(boundaryConnectors);
|
||||
result.addAll(boundaryNodes);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,130 @@
|
||||
package visualiser.layout;
|
||||
|
||||
import com.sun.javafx.geom.PickRay;
|
||||
import com.sun.javafx.scene.input.PickResultChooser;
|
||||
import com.sun.javafx.sg.prism.NGNode;
|
||||
import javafx.scene.Node;
|
||||
import javafx.scene.shape.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 3D plane
|
||||
*/
|
||||
public class Plane3D extends TriangleMesh{
|
||||
|
||||
/**
|
||||
* Length is up down, and width is left right. Drawn on the x-y plane with z kept at 0.
|
||||
* @param width width of the plane
|
||||
* @param length length of the plane
|
||||
* @param subdivisionsWidth number of divisions along the width of the plane
|
||||
* @param subdivisionsLength number of division along the length of the plane
|
||||
*/
|
||||
public Plane3D(float width, float length, int subdivisionsWidth, int subdivisionsLength){
|
||||
//add texture points and vertex points
|
||||
float subWidth = width / (float) subdivisionsWidth;
|
||||
float subLength = length / (float) subdivisionsLength;
|
||||
|
||||
ArrayList<Float> pointsList = new ArrayList<>();
|
||||
ArrayList<Float> textureCoord = new ArrayList<>();
|
||||
float startW = -width/2;
|
||||
float startL = -length/2;
|
||||
|
||||
for (float l = 0; l <= length; l += subLength) {
|
||||
for (float w = 0; w <= width; w += subWidth){
|
||||
//add points
|
||||
pointsList.add(w + startW);
|
||||
pointsList.add(l + startL);
|
||||
pointsList.add(0f);
|
||||
//addTexture coords
|
||||
textureCoord.add(1 - w/width);
|
||||
textureCoord.add(1 - l/length);
|
||||
}
|
||||
}
|
||||
|
||||
this.getPoints().setAll(copyListToArray(pointsList));
|
||||
this.getTexCoords().setAll(copyListToArray(textureCoord));
|
||||
|
||||
//connect points to make faces
|
||||
ArrayList<Integer> faces = new ArrayList<>();
|
||||
|
||||
int listSize = pointsList.size()/3;
|
||||
int divsInRow = subdivisionsWidth + 1;
|
||||
for (int i = 0; i < listSize; i++){
|
||||
int row = i/divsInRow;
|
||||
|
||||
if (row < 1){
|
||||
continue;
|
||||
}
|
||||
|
||||
boolean notFirstCol = (i) % divsInRow != 0;
|
||||
boolean notLastCol = (i + 1) % divsInRow != 0;
|
||||
if (notFirstCol){
|
||||
faces.add(i);
|
||||
faces.add(i);
|
||||
// printPointAtIndex(i);
|
||||
faces.add(i - divsInRow);
|
||||
faces.add(i - divsInRow);
|
||||
// printPointAtIndex(i - divsInRow);
|
||||
faces.add(i - 1);
|
||||
faces.add(i - 1);
|
||||
// printPointAtIndex(i-1);
|
||||
}
|
||||
if (notLastCol) {
|
||||
faces.add(i - divsInRow + 1);
|
||||
faces.add(i - divsInRow + 1);
|
||||
// printPointAtIndex(i - divsInRow + 1);
|
||||
faces.add(i - divsInRow);
|
||||
faces.add(i - divsInRow);
|
||||
// printPointAtIndex(i - divsInRow);
|
||||
faces.add(i);
|
||||
faces.add(i);
|
||||
// printPointAtIndex(i);
|
||||
}
|
||||
|
||||
}
|
||||
this.getFaces().setAll(copyListToIntArray(faces));
|
||||
}
|
||||
|
||||
/**
|
||||
* Testing function to see if the points are correct
|
||||
* @param index index that the points correspond to (remember 3 is a point)
|
||||
*/
|
||||
private void printPointAtIndex(int index){
|
||||
int i = index * 3;
|
||||
float x = this.getPoints().get(i);
|
||||
float y = this.getPoints().get(i + 1);
|
||||
float z = this.getPoints().get(i + 2);
|
||||
System.out.println(String.format("Point at %d is x:%f, y:%f, z:%f", index, x, y, z));
|
||||
}
|
||||
|
||||
/**
|
||||
* copies the list to a float array because java List.toArray isn't working
|
||||
* @param list list to copy
|
||||
* @return array
|
||||
*/
|
||||
private static float[] copyListToArray(List<Float> list){
|
||||
float[] res = new float[list.size()];
|
||||
for (int i = 0; i < list.size(); i++){
|
||||
res[i] = list.get(i);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
* copies the list to an integer array because java List.toArray isn't working
|
||||
* @param list list to copy
|
||||
* @return array
|
||||
*/
|
||||
private static int[] copyListToIntArray(List<Integer> list){
|
||||
int[] res = new int[list.size()];
|
||||
for (int i = 0; i < list.size(); i++){
|
||||
res[i] = list.get(i);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,126 @@
|
||||
package visualiser.layout;
|
||||
|
||||
import javafx.geometry.Point3D;
|
||||
import javafx.scene.image.Image;
|
||||
import javafx.scene.image.ImageView;
|
||||
import javafx.scene.image.PixelWriter;
|
||||
import javafx.scene.image.WritableImage;
|
||||
import javafx.scene.paint.Color;
|
||||
import javafx.scene.paint.PhongMaterial;
|
||||
import javafx.scene.shape.Box;
|
||||
import javafx.scene.shape.MeshView;
|
||||
import javafx.scene.shape.Shape3D;
|
||||
import javafx.scene.shape.TriangleMesh;
|
||||
import visualiser.utils.PerlinNoiseGenerator;
|
||||
|
||||
/**
|
||||
* Creates a SeaSurface
|
||||
*/
|
||||
public class SeaSurface extends Subject3D {
|
||||
/**
|
||||
* Sea Surface Constructor
|
||||
* @param size size of the sea surface (has to be square for simplicity's sake)
|
||||
* @param freq frequency the perlin noise is to be generated at
|
||||
*/
|
||||
public SeaSurface(int size, double freq){
|
||||
super(createSurface(size, freq));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the sea surface
|
||||
*/
|
||||
private static Shape3D createSurface(int size, double freq){
|
||||
float[][] noiseArray = PerlinNoiseGenerator.createNoise(size, freq);
|
||||
Image diffuseMap = createImage(noiseArray.length, noiseArray);
|
||||
|
||||
PhongMaterial material = new PhongMaterial();
|
||||
material.setDiffuseMap(diffuseMap);
|
||||
|
||||
Plane3D seaPlane = new Plane3D(noiseArray.length, noiseArray.length, 10, 10);
|
||||
MeshView seaSurface = new MeshView(seaPlane);
|
||||
seaSurface.setMaterial(material);
|
||||
seaSurface.setMouseTransparent(true);
|
||||
seaSurface.toFront();
|
||||
|
||||
return seaSurface;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create texture for uv mapping
|
||||
* @param size size of the image to make
|
||||
* @param noise array of noise
|
||||
* @return image that is created
|
||||
*/
|
||||
private static Image createImage(double size, float[][] noise) {
|
||||
|
||||
int width = (int) size;
|
||||
int height = (int) size;
|
||||
|
||||
WritableImage wr = new WritableImage(width, height);
|
||||
PixelWriter pw = wr.getPixelWriter();
|
||||
//interpolate colours based on noise
|
||||
for (int x = 0; x < width; x++) {
|
||||
for (int y = 0; y < height; y++) {
|
||||
|
||||
float value = noise[x][y];
|
||||
|
||||
double gray = normalizeValue(value, -.5, .5, 0., 1.);
|
||||
|
||||
gray = clamp(gray, 0, 1);
|
||||
|
||||
//values to interpolate on
|
||||
Color brightBlue = new Color(0.06, 0.5, .78, 1);
|
||||
Color lightBlue = new Color(0.15, 0.68, .88, 1);
|
||||
Color lighterBlue = new Color(0.28, 0.73, .91, 1);
|
||||
|
||||
Color colour = Color.WHITE.interpolate(brightBlue, gray).interpolate(lighterBlue, gray).interpolate(lightBlue, gray);
|
||||
|
||||
pw.setColor(x, y, colour);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return wr;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Nomalises the values so that the colours are correct
|
||||
* @param value value to normalise
|
||||
* @param min current min
|
||||
* @param max current max
|
||||
* @param newMin new min
|
||||
* @param newMax new max
|
||||
* @return returns normalised value
|
||||
*/
|
||||
private static double normalizeValue(double value, double min, double max, double newMin, double newMax) {
|
||||
|
||||
return (value - min) * (newMax - newMin) / (max - min) + newMin;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* clamps a value between a min and max
|
||||
* @param value value to clamp
|
||||
* @param min minimum value it can be
|
||||
* @param max maximum value it can be
|
||||
* @return result after clamp
|
||||
*/
|
||||
private static double clamp(double value, double min, double max) {
|
||||
|
||||
if (Double.compare(value, min) < 0)
|
||||
return min;
|
||||
|
||||
if (Double.compare(value, max) > 0)
|
||||
return max;
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent rescaling of sea surface
|
||||
* @param scale ignored
|
||||
*/
|
||||
@Override
|
||||
public void setScale(double scale) {}
|
||||
}
|
||||
@ -0,0 +1,162 @@
|
||||
package visualiser.layout;
|
||||
|
||||
import javafx.geometry.Point3D;
|
||||
import javafx.scene.image.Image;
|
||||
import javafx.scene.image.PixelWriter;
|
||||
import javafx.scene.image.WritableImage;
|
||||
import javafx.scene.paint.Color;
|
||||
import javafx.scene.paint.PhongMaterial;
|
||||
import javafx.scene.shape.MeshView;
|
||||
import javafx.scene.transform.Rotate;
|
||||
import visualiser.utils.PerlinNoiseGenerator;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Creates a skyBox
|
||||
*/
|
||||
public class SkyBox {
|
||||
private int size;
|
||||
private double x;
|
||||
private double y;
|
||||
private double z;
|
||||
private double freq;
|
||||
private List<Subject3D> skyBoxPlanes = new ArrayList<>();
|
||||
|
||||
public SkyBox(int edgeLength, double freq, double x, double y, double z) {
|
||||
this.size = edgeLength;
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
this.freq = freq;
|
||||
makeSkyBox();
|
||||
}
|
||||
|
||||
private void makeSkyBox() {
|
||||
addTop();
|
||||
addFront();
|
||||
addBack();
|
||||
addLeft();
|
||||
addRight();
|
||||
addSeaOverlay();
|
||||
}
|
||||
|
||||
private void addTop() {
|
||||
MeshView surface = makeSurface(new Image(getClass().getClassLoader().getResourceAsStream("images/skybox/skyTop.png")));
|
||||
|
||||
surface.setRotationAxis(new Point3D(0, 0, 1));
|
||||
surface.setRotate(180);
|
||||
|
||||
surface.setTranslateX(x);
|
||||
surface.setTranslateY(y - size + 1);
|
||||
surface.setTranslateZ(z);
|
||||
|
||||
Subject3D top = new Subject3D(surface);
|
||||
skyBoxPlanes.add(top);
|
||||
}
|
||||
|
||||
private void addRight() {
|
||||
MeshView surface = makeSurface(new Image(getClass().getClassLoader().getResourceAsStream("images/skybox/skyRight.png")));
|
||||
|
||||
surface.setTranslateX(size/2);
|
||||
surface.setTranslateY(size/2);
|
||||
surface.setRotationAxis(new Point3D(1, 0, 0));
|
||||
surface.setRotate(90);
|
||||
surface.setTranslateX(-size/2);
|
||||
surface.setTranslateY(-size/2);
|
||||
|
||||
surface.setTranslateX(x);
|
||||
surface.setTranslateY(y - size/2);
|
||||
surface.setTranslateZ(z + size/2 - 1);
|
||||
|
||||
|
||||
Subject3D right = new Subject3D(surface);
|
||||
skyBoxPlanes.add(right);
|
||||
}
|
||||
|
||||
private void addLeft() {
|
||||
MeshView surface = makeSurface(new Image(getClass().getClassLoader().getResourceAsStream("images/skybox/skyLeft.png")));
|
||||
|
||||
surface.setTranslateX(size/2);
|
||||
surface.setTranslateY(size/2);
|
||||
surface.setRotationAxis(new Point3D(1, 0, 0));
|
||||
surface.setRotate(-90);
|
||||
surface.setTranslateX(-size/2);
|
||||
surface.setTranslateY(-size/2);
|
||||
|
||||
surface.setScaleX(-1);
|
||||
surface.setScaleZ(-1);
|
||||
|
||||
surface.setTranslateX(x);
|
||||
surface.setTranslateY(y - size/2);
|
||||
surface.setTranslateZ(z - size/2 + 1);
|
||||
|
||||
|
||||
Subject3D left = new Subject3D(surface);
|
||||
skyBoxPlanes.add(left);
|
||||
}
|
||||
|
||||
private void addBack() {
|
||||
MeshView surface = makeSurface(new Image(getClass().getClassLoader().getResourceAsStream("images/skybox/skyBack.png")));
|
||||
surface.getTransforms().add(new Rotate(90, 0, 0));
|
||||
|
||||
surface.setRotationAxis(new Point3D(1, 0, 0));
|
||||
surface.setRotate(-90);
|
||||
|
||||
surface.setScaleY(-1);
|
||||
surface.setScaleZ(-1);
|
||||
|
||||
surface.setTranslateX(x - size/2 + 1);
|
||||
surface.setTranslateY(y - size/2);
|
||||
surface.setTranslateZ(z);
|
||||
|
||||
Subject3D back = new Subject3D(surface);
|
||||
skyBoxPlanes.add(back);
|
||||
}
|
||||
|
||||
private void addFront() {
|
||||
MeshView surface = makeSurface(new Image(getClass().getClassLoader().getResourceAsStream("images/skybox/skyFront.png")));
|
||||
|
||||
surface.setTranslateX(size/2);
|
||||
surface.setTranslateY(size/2);
|
||||
surface.setRotationAxis(new Point3D(0, 0, 1));
|
||||
surface.setRotate(-90);
|
||||
surface.setTranslateX(-size/2);
|
||||
surface.setTranslateY(-size/2);
|
||||
|
||||
surface.setTranslateX(x + size/2 - 1);
|
||||
surface.setTranslateY(y - size/2);
|
||||
surface.setTranslateZ(z);
|
||||
|
||||
Subject3D front = new Subject3D(surface);
|
||||
skyBoxPlanes.add(front);
|
||||
}
|
||||
|
||||
private MeshView makeSurface(Image diffuseMap) {
|
||||
|
||||
PhongMaterial material = new PhongMaterial();
|
||||
//material.setDiffuseColor(Color.BLUE);
|
||||
material.setDiffuseMap(diffuseMap);
|
||||
//material.setSpecularColor(Color.WHITE);
|
||||
|
||||
Plane3D plane = new Plane3D(size, size, 10, 10);
|
||||
MeshView surface = new MeshView(plane);
|
||||
surface.setMaterial(material);
|
||||
surface.setMouseTransparent(true);
|
||||
return surface;
|
||||
}
|
||||
|
||||
private void addSeaOverlay() {
|
||||
SeaSurface seaSurface = new SeaSurface(size * 3, freq);
|
||||
seaSurface.setX(x);
|
||||
seaSurface.setY(y - size/4 + 1);
|
||||
seaSurface.setZ(z);
|
||||
skyBoxPlanes.add(seaSurface);
|
||||
}
|
||||
|
||||
public List<Subject3D> getSkyBoxPlanes() {
|
||||
return skyBoxPlanes;
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,88 @@
|
||||
package visualiser.utils;
|
||||
|
||||
/**
|
||||
* Perlin Noise Generator
|
||||
*/
|
||||
public class PerlinNoiseGenerator {
|
||||
|
||||
|
||||
/**
|
||||
* Create an array of the given size with values of perlin noise
|
||||
* @param size size of array that you wish to create
|
||||
* @param freq frequency that the noise is to be generated at.
|
||||
* @return noise generated
|
||||
*/
|
||||
public static float[][] createNoise( int size, double freq) {
|
||||
float[][] noiseArray = new float[(int) size][(int) size];
|
||||
|
||||
for (int x = 0; x < size; x++) {
|
||||
for (int y = 0; y < size; y++) {
|
||||
|
||||
double frequency = freq / (double) size;
|
||||
|
||||
double noise = ImprovedNoise.noise(x * frequency, y * frequency, 0);
|
||||
|
||||
noiseArray[x][y] = (float) noise;
|
||||
}
|
||||
}
|
||||
|
||||
return noiseArray;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Perlin noise generator
|
||||
*
|
||||
* // JAVA REFERENCE IMPLEMENTATION OF IMPROVED NOISE - COPYRIGHT 2002 KEN PERLIN.
|
||||
* // http://mrl.nyu.edu/~perlin/paper445.pdf
|
||||
* // http://mrl.nyu.edu/~perlin/noise/
|
||||
*/
|
||||
public final static class ImprovedNoise {
|
||||
static public double noise(double x, double y, double z) {
|
||||
int X = (int)Math.floor(x) & 255, // FIND UNIT CUBE THAT
|
||||
Y = (int)Math.floor(y) & 255, // CONTAINS POINT.
|
||||
Z = (int)Math.floor(z) & 255;
|
||||
x -= Math.floor(x); // FIND RELATIVE X,Y,Z
|
||||
y -= Math.floor(y); // OF POINT IN CUBE.
|
||||
z -= Math.floor(z);
|
||||
double u = fade(x), // COMPUTE FADE CURVES
|
||||
v = fade(y), // FOR EACH OF X,Y,Z.
|
||||
w = fade(z);
|
||||
int A = p[X ]+Y, AA = p[A]+Z, AB = p[A+1]+Z, // HASH COORDINATES OF
|
||||
B = p[X+1]+Y, BA = p[B]+Z, BB = p[B+1]+Z; // THE 8 CUBE CORNERS,
|
||||
|
||||
return lerp(w, lerp(v, lerp(u, grad(p[AA ], x , y , z ), // AND ADD
|
||||
grad(p[BA ], x-1, y , z )), // BLENDED
|
||||
lerp(u, grad(p[AB ], x , y-1, z ), // RESULTS
|
||||
grad(p[BB ], x-1, y-1, z ))),// FROM 8
|
||||
lerp(v, lerp(u, grad(p[AA+1], x , y , z-1 ), // CORNERS
|
||||
grad(p[BA+1], x-1, y , z-1 )), // OF CUBE
|
||||
lerp(u, grad(p[AB+1], x , y-1, z-1 ),
|
||||
grad(p[BB+1], x-1, y-1, z-1 ))));
|
||||
}
|
||||
static double fade(double t) { return t * t * t * (t * (t * 6 - 15) + 10); }
|
||||
static double lerp(double t, double a, double b) { return a + t * (b - a); }
|
||||
static double grad(int hash, double x, double y, double z) {
|
||||
int h = hash & 15; // CONVERT LO 4 BITS OF HASH CODE
|
||||
double u = h<8 ? x : y, // INTO 12 GRADIENT DIRECTIONS.
|
||||
v = h<4 ? y : h==12||h==14 ? x : z;
|
||||
return ((h&1) == 0 ? u : -u) + ((h&2) == 0 ? v : -v);
|
||||
}
|
||||
static final int p[] = new int[512], permutation[] = { 151,160,137,91,90,15,
|
||||
131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23,
|
||||
190, 6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33,
|
||||
88,237,149,56,87,174,20,125,136,171,168, 68,175,74,165,71,134,139,48,27,166,
|
||||
77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244,
|
||||
102,143,54, 65,25,63,161, 1,216,80,73,209,76,132,187,208, 89,18,169,200,196,
|
||||
135,130,116,188,159,86,164,100,109,198,173,186, 3,64,52,217,226,250,124,123,
|
||||
5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42,
|
||||
223,183,170,213,119,248,152, 2,44,154,163, 70,221,153,101,155,167, 43,172,9,
|
||||
129,22,39,253, 19,98,108,110,79,113,224,232,178,185, 112,104,218,246,97,228,
|
||||
251,34,242,193,238,210,144,12,191,179,162,241, 81,51,145,235,249,14,239,107,
|
||||
49,192,214, 31,181,199,106,157,184, 84,204,176,115,121,50,45,127, 4,150,254,
|
||||
138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180
|
||||
};
|
||||
static { for (int i=0; i < 256 ; i++) p[256+i] = p[i] = permutation[i]; }
|
||||
}
|
||||
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 78 KiB |
|
After Width: | Height: | Size: 103 KiB |
|
After Width: | Height: | Size: 85 KiB |
|
After Width: | Height: | Size: 99 KiB |
|
After Width: | Height: | Size: 48 KiB |
@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<Race>
|
||||
<RaceID>5326</RaceID>
|
||||
<RaceType>FLEET</RaceType>
|
||||
<CreationTimeDate>RACE_CREATION_TIME</CreationTimeDate>
|
||||
<RaceStartTime Postpone="false" Time="RACE_START_TIME"/>
|
||||
<Participants>
|
||||
</Participants>
|
||||
<CompoundMarkSequence>
|
||||
<Corner SeqID="1" CompoundMarkID="1" Rounding="SP" ZoneSize="3" />
|
||||
<Corner SeqID="2" CompoundMarkID="2" Rounding="Port" ZoneSize="3" />
|
||||
<Corner SeqID="3" CompoundMarkID="4" Rounding="Port" ZoneSize="3" />
|
||||
<Corner SeqID="4" CompoundMarkID="3" Rounding="Starboard" ZoneSize="3" />
|
||||
<Corner SeqID="5" CompoundMarkID="4" Rounding="Port" ZoneSize="3" />
|
||||
<Corner SeqID="6" CompoundMarkID="5" Rounding="SP" ZoneSize="3"/>
|
||||
</CompoundMarkSequence>
|
||||
<Course>
|
||||
<CompoundMark CompoundMarkID="1" Name="Start Line">
|
||||
<Mark SeqId="1" Name="PRO" TargetLat="32.296577" TargetLng="-64.854304" SourceID="101"/>
|
||||
<Mark SeqId="2" Name="PIN" TargetLat="32.293771" TargetLng="-64.855242" SourceID="102"/>
|
||||
</CompoundMark>
|
||||
<CompoundMark CompoundMarkID="2" Name="Marker 1">
|
||||
<Mark Name="Marker1" TargetLat="32.293039" TargetLng="-64.843983" SourceID="103"/>
|
||||
</CompoundMark>
|
||||
<CompoundMark CompoundMarkID="3" Name="Windward Gate">
|
||||
<Mark Name="WGL" SeqId="1" TargetLat="32.28468" TargetLng="-64.850045" SourceID="104"/>
|
||||
<Mark Name="WGR" SeqId="2" TargetLat="32.280164" TargetLng="-64.847591" SourceID="105"/>
|
||||
</CompoundMark>
|
||||
<CompoundMark CompoundMarkID="4" Name="Leeward Gate">
|
||||
<Mark Name="LGL" SeqId="1" TargetLat="32.309693" TargetLng="-64.835249" SourceID="106"/>
|
||||
<Mark Name="LGR" SeqId="2" TargetLat="32.308046" TargetLng="-64.831785" SourceID="107"/>
|
||||
</CompoundMark>
|
||||
<CompoundMark CompoundMarkID="5" Name="Finish Line">
|
||||
<Mark Name="FL" SeqId="1" TargetLat="32.317379" TargetLng="-64.839291" SourceID="108"/>
|
||||
<Mark Name="FR" SeqId="2" TargetLat="32.317257" TargetLng="-64.83626" SourceID="109"/>
|
||||
</CompoundMark>
|
||||
</Course>
|
||||
<CourseLimit>
|
||||
<Limit Lat="32.313922" Lon="-64.837168" SeqID="1"/>
|
||||
<Limit Lat="32.317379" Lon="-64.839291" SeqID="2"/>
|
||||
<Limit Lat="32.317911" Lon="-64.836996" SeqID="3"/>
|
||||
<Limit Lat="32.317257" Lon="-64.83626" SeqID="4"/>
|
||||
<Limit Lat="32.304273" Lon="-64.822834" SeqID="5"/>
|
||||
<Limit Lat="32.279097" Lon="-64.841545" SeqID="6"/>
|
||||
<Limit Lat="32.279604" Lon="-64.849871" SeqID="7"/>
|
||||
<Limit Lat="32.289545" Lon="-64.854162" SeqID="8"/>
|
||||
<Limit Lat="32.290198" Lon="-64.858711" SeqID="9"/>
|
||||
<Limit Lat="32.297164" Lon="-64.856394" SeqID="10"/>
|
||||
<Limit Lat="32.296148" Lon="-64.849184" SeqID="11"/>
|
||||
</CourseLimit>
|
||||
</Race>
|
||||
Loading…
Reference in new issue