From: Svjatoslav Agejenko Date: Wed, 3 Aug 2016 20:37:42 +0000 (+0300) Subject: initial commit X-Git-Url: http://www2.svjatoslav.eu/gitweb/?p=sixth-3d-demos.git;a=commitdiff_plain;h=8699433dbd9238c4d926d78bd2e50f892fc51324;ds=sidebyside initial commit --- 8699433dbd9238c4d926d78bd2e50f892fc51324 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..26b6b1a --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +# Created by .ignore support plugin (hsz.mobi) +/.idea/ diff --git a/doc/index.html b/doc/index.html new file mode 100644 index 0000000..534abe0 --- /dev/null +++ b/doc/index.html @@ -0,0 +1,202 @@ + + + + + + + +Sixth 3D engine demos + + + + + + + +
+

Sixth 3D engine demos

+
+

Table of Contents

+ +
+
+ + + +
+

1 Description

+
+

+Goal of this project is to show off capabilities of Sixth 3D engine. Also to +show examples of its usage. +

+ + +
+

screenshots.png +

+
+ +

+Sample scenes rendered at interactive framerates by Sixth 3D engine. +

+
+
+
+
+

Author: Svjatoslav Agejenko

+

Created: 2016-08-03 Wed 23:35

+

Validate

+
+ + diff --git a/doc/index.org b/doc/index.org new file mode 100644 index 0000000..ad3fe89 --- /dev/null +++ b/doc/index.org @@ -0,0 +1,143 @@ +#+TITLE: Sixth 3D engine demos + +----- +- This is a subproject of [[http://www2.svjatoslav.eu/gitbrowse/sixth-3d/doc/index.html][Sixth 3D]] +- [[http://www2.svjatoslav.eu/gitweb/?p=sixth.git;a=snapshot;h=HEAD;sf=tgz][download latest snapshot]] + +- This program is free software; you can redistribute it and/or modify it under + the terms of version 3 of the [[https://www.gnu.org/licenses/lgpl.html][GNU Lesser General Public License]] or later as + published by the Free Software Foundation. + +- Program author: + - Svjatoslav Agejenko + - Homepage: http://svjatoslav.eu + - Email: mailto://svjatoslav@svjatoslav.eu + +- [[http://svjatoslav.eu/programs.jsp][other applications hosted at svjatoslav.eu]] + + +* Current status +[[http://www2.svjatoslav.eu/gitbrowse/sixth/doc/screenshots/index.html][http://www2.svjatoslav.eu/gitbrowse/sixth/doc/screenshots.png]] + + +Sample scenes rendered at interactive framerates by Sixth 3D engine. + + +Sixth is presently in research / prototyping and ideas collecting +phase. Some working parts are already implemented, and can be run as a +demo or as a library in other projects, if you are computer +programmer. System is far from being useful for non programmers (Pre +alpha). + + +Implemented and working features: +- First layer of storage: Simple persistent key-value map. +- In software, pure Java realtime 3D rendering engine. + + +[[http://www2.svjatoslav.eu/gitbrowse/sixth/doc/applet.html][Run Sixth 3D/GUI demos as Java applet]] + + +System is implemented in Java because: +- It scales well to handle great complexity. +- It is easy to refactor and experiment with. +- It is fast enough thanks to Java virtual machine just-in-time compiler. +- Easy to run on various hardware platforms and operating systems. + +** 3D rendering + +3D rendering is done in software, 100% pure Java on CPU. At least for +now. Modern CPU cores count keeps growing and therefore rendering by +CPU is not as expensive as it used to be for the old single core +systems. + +CPU rendering performance is already good enough to implement usable +3D UI at sufficient detail level, resolution and frame rate. + +Pure Java also means easy portability and installation. No need to +deal with platform specific dependencies. + +Also CPU rendering allows to easily test different rendering algorithms +and retains complete control of every rendered pixel. + +* Vision +- Human computer symbiosis to unleash full potential of human mind and + computer. +- A tool to amplify human ability. + +** Key ideas from user perspective +- Helps/assists in understanding, discovering, learning and creating + things by being very visual and interactive. (I think of + problems/solutions visually and I want user interface/experience to + reflect that) + +- Properly visualizes and immerses user in completely various forms of + information and provides intuitive and powerful ways to explore, + interact and manipulate it with fast feedback loop to immediately + see results. + +- I like this quote: +#+BEGIN_QUOTE +“Virtual reality holds the key to the evolution of the human mind” +Dr. Lawrence Angelo, The Lawnmower Man (1992) +#+END_QUOTE + +** Key technical ideas +System should make use of distributed computing like SSI or/and Hadoop +for greater performance and reliability. + +System should use some overlay network to enable secure and reliable +and easy to use communication between any process on any networked +computer as well as human to human communication. +* Software development +Instructions to embed Sixth in your project as a library. Maven +*pom.xml* file snippet: +#+BEGIN_SRC xml + + ... + + eu.svjatoslav + sixth + 1.2 + + ... + + + + ... + + svjatoslav.eu + Svjatoslav repository + http://www2.svjatoslav.eu/maven/ + + ... + +#+END_SRC + +[[http://www2.svjatoslav.eu/projects/sixth/codegraphs/][Auto-generated graphs for parts of Sixth code/architecture]] using [[http://www2.svjatoslav.eu/gitbrowse/javainspect/doc/index.html][this +tool]] + +* Ideas to possibly consider/incorporate in the future + +- Semantic networks / knowledge trees. + - Is able to use natural language for knowledge mining and + question answering. This could potentially lead to self aware + artificial intelligence. Because of [[http://en.wikipedia.org/wiki/Three_Laws_of_Robotics]["Three laws safe"]] design, + there is nothing that can go wrong. + +- Become an alternative to or an integrated part of KDE, Gnome, + Canonical Unity or similar desktop user interfaces. + +- Become an open source scientific computing engine of structured data + as an alternative to proprietary Wolfram Alpha. + +- Become an open source solution for unstructured knowledge extraction + and processing, similar to IBM Watson. + +- P2P (Peer to peer) capabilities: + - File/data sharing system. + - Data streaming system. + - Distributed backup system. + - Distributed computation system. + - Communication system. + - Possibility of completely decentralized and stealth mode of operation for information publishing, storage and distribution, similar to Freenet. diff --git a/doc/screenshots.png b/doc/screenshots.png new file mode 100644 index 0000000..bf0cd7d Binary files /dev/null and b/doc/screenshots.png differ diff --git a/doc/screenshots/.thumbnails/another test scene (5362752B).jpeg b/doc/screenshots/.thumbnails/another test scene (5362752B).jpeg new file mode 100644 index 0000000..68e88df Binary files /dev/null and b/doc/screenshots/.thumbnails/another test scene (5362752B).jpeg differ diff --git a/doc/screenshots/.thumbnails/another test scene (62C8D31D).jpeg b/doc/screenshots/.thumbnails/another test scene (62C8D31D).jpeg new file mode 100644 index 0000000..37b2943 Binary files /dev/null and b/doc/screenshots/.thumbnails/another test scene (62C8D31D).jpeg differ diff --git a/doc/screenshots/.thumbnails/mathematical formulas (7454DC19).jpeg b/doc/screenshots/.thumbnails/mathematical formulas (7454DC19).jpeg new file mode 100644 index 0000000..edd43e5 Binary files /dev/null and b/doc/screenshots/.thumbnails/mathematical formulas (7454DC19).jpeg differ diff --git a/doc/screenshots/.thumbnails/mathematical formulas (82926553).jpeg b/doc/screenshots/.thumbnails/mathematical formulas (82926553).jpeg new file mode 100644 index 0000000..83db0ac Binary files /dev/null and b/doc/screenshots/.thumbnails/mathematical formulas (82926553).jpeg differ diff --git a/doc/screenshots/.thumbnails/metadata_6.dat b/doc/screenshots/.thumbnails/metadata_6.dat new file mode 100644 index 0000000..d041cab Binary files /dev/null and b/doc/screenshots/.thumbnails/metadata_6.dat differ diff --git a/doc/screenshots/.thumbnails/raytracing fractal in voxel polygon hybrid scene (1F22E82D).jpeg b/doc/screenshots/.thumbnails/raytracing fractal in voxel polygon hybrid scene (1F22E82D).jpeg new file mode 100644 index 0000000..774f66a Binary files /dev/null and b/doc/screenshots/.thumbnails/raytracing fractal in voxel polygon hybrid scene (1F22E82D).jpeg differ diff --git a/doc/screenshots/.thumbnails/raytracing fractal in voxel polygon hybrid scene (534B3488).jpeg b/doc/screenshots/.thumbnails/raytracing fractal in voxel polygon hybrid scene (534B3488).jpeg new file mode 100644 index 0000000..f385768 Binary files /dev/null and b/doc/screenshots/.thumbnails/raytracing fractal in voxel polygon hybrid scene (534B3488).jpeg differ diff --git a/doc/screenshots/.thumbnails/text editors (C0263A2).jpeg b/doc/screenshots/.thumbnails/text editors (C0263A2).jpeg new file mode 100644 index 0000000..f8543d5 Binary files /dev/null and b/doc/screenshots/.thumbnails/text editors (C0263A2).jpeg differ diff --git a/doc/screenshots/.thumbnails/text editors (CBB27271).jpeg b/doc/screenshots/.thumbnails/text editors (CBB27271).jpeg new file mode 100644 index 0000000..59b35ea Binary files /dev/null and b/doc/screenshots/.thumbnails/text editors (CBB27271).jpeg differ diff --git a/doc/screenshots/another test scene.png b/doc/screenshots/another test scene.png new file mode 100644 index 0000000..9ddf563 Binary files /dev/null and b/doc/screenshots/another test scene.png differ diff --git a/doc/screenshots/index.html b/doc/screenshots/index.html new file mode 100644 index 0000000..c07b289 --- /dev/null +++ b/doc/screenshots/index.html @@ -0,0 +1,27 @@ + + + + + + + + +

Gallery

+

+ + + +

+
+
+another test scene
(1680x1026, 840x513) +
+
+mathematical formulas
(1680x1026, 840x513) +
+
+raytracing fractal in voxel polygon hybrid scene
(1680x1026, 840x513) +
+
+text editors
(1672x977, 836x488) +
diff --git a/doc/screenshots/mathematical formulas.png b/doc/screenshots/mathematical formulas.png new file mode 100644 index 0000000..0a48618 Binary files /dev/null and b/doc/screenshots/mathematical formulas.png differ diff --git a/doc/screenshots/raytracing fractal in voxel polygon hybrid scene.png b/doc/screenshots/raytracing fractal in voxel polygon hybrid scene.png new file mode 100644 index 0000000..d914d8c Binary files /dev/null and b/doc/screenshots/raytracing fractal in voxel polygon hybrid scene.png differ diff --git a/doc/screenshots/text editors.png b/doc/screenshots/text editors.png new file mode 100644 index 0000000..2081117 Binary files /dev/null and b/doc/screenshots/text editors.png differ diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..e433b21 --- /dev/null +++ b/pom.xml @@ -0,0 +1,169 @@ + + 4.0.0 + eu.svjatoslav + sixth-3d-demos + 1.0-SNAPSHOT + Sixth 3D demos + 3D engine demos + + + UTF-8 + UTF-8 + + + + svjatoslav.eu + http://svjatoslav.eu + + + + + junit + junit + 4.8.1 + test + + + + eu.svjatoslav + sixth-3d + 1.0 + + + + eu.svjatoslav + javainspect + 1.5 + test + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.3.2 + + 1.8 + 1.8 + true + UTF-8 + + + + + org.apache.maven.plugins + maven-source-plugin + 2.2.1 + + + attach-sources + + jar + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.9 + + + attach-javadocs + + jar + + + + + + + org.apache.maven.plugins + maven-resources-plugin + 2.4.3 + + UTF-8 + + + + + maven-assembly-plugin + + + + + eu.svjatoslav.sixth.Main + + + + jar-with-dependencies + + sixth + false + + + + + package-jar-with-dependencies + package + + single + + + + jar-with-dependencies + + + + eu.svjatoslav.sixth.Main + + + + + + + + + + + org.apache.maven.wagon + wagon-ssh-external + 2.6 + + + + + + + + svjatoslav.eu + svjatoslav.eu + scpexe://svjatoslav.eu/var/www/svjatoslav.eu/maven + + + svjatoslav.eu + svjatoslav.eu + scpexe://svjatoslav.eu/var/www/svjatoslav.eu/maven + + + + + + svjatoslav.eu + Svjatoslav repository + http://www2.svjatoslav.eu/maven/ + + + + + scm:git:ssh://git@svjatoslav.eu/home/git/repositories/sixth-3d-demos.git + scm:git:ssh://git@svjatoslav.eu/home/git/repositories/sixth-3d-demos.git + + + + + \ No newline at end of file diff --git a/sixth-3d-demos.iml b/sixth-3d-demos.iml new file mode 100644 index 0000000..867e70a --- /dev/null +++ b/sixth-3d-demos.iml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/java/eu/svjatoslav/sixth/e3d/examples/GraphDemo.java b/src/main/java/eu/svjatoslav/sixth/e3d/examples/GraphDemo.java new file mode 100644 index 0000000..79027b0 --- /dev/null +++ b/src/main/java/eu/svjatoslav/sixth/e3d/examples/GraphDemo.java @@ -0,0 +1,138 @@ +/* + * Sixth - System for data storage, computation, exploration and interaction. + * Copyright ©2012-2016, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 3 of the GNU Lesser General Public License + * or later as published by the Free Software Foundation. + */ + +package eu.svjatoslav.sixth.e3d.examples; + +import eu.svjatoslav.sixth.e3d.geometry.Point2D; +import eu.svjatoslav.sixth.e3d.geometry.Point3D; +import eu.svjatoslav.sixth.e3d.gui.ViewFrame; +import eu.svjatoslav.sixth.e3d.renderer.raster.ShapeCollection; +import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.Graph; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +public class GraphDemo { + + private static final double scale = 50d; + + private static Graph getCosinusGraph(final Point3D location) + throws IOException { + final List data = new ArrayList<>(); + for (double x = 0; x < 20; x += 0.25) { + final double y = Math.cos(x); + + final Point2D p = new Point2D(x, y); + data.add(p); + } + + return new Graph(scale, data, "Cosinus", location); + } + + private static Graph getFormula1Graph(final Point3D location) + throws IOException { + final List data = new ArrayList<>(); + for (double x = 0; x < 20; x += 0.25) { + final double y = Math.sin(Math.tan(x)); + + final Point2D p = new Point2D(x, y); + data.add(p); + } + + return new Graph(scale, data, "y = sin(tan(x))", location); + } + + private static Graph getFormula2Graph(final Point3D location) + throws IOException { + final List data = new ArrayList<>(); + for (double x = 0; x < 20; x += 0.25) { + final double y = (Math.pow((10 - x), 2) / 30) - 2; + + final Point2D p = new Point2D(x, y); + data.add(p); + } + + return new Graph(scale, data, "y = ( (10-x)^2 ) / 30", location); + } + + private static Graph getFormula3Graph(final Point3D location) + throws IOException { + final List data = new ArrayList<>(); + for (double x = 0; x < 20; x += 0.25) { + final double y = Math.sin(x / 2) + Math.sin(x / 1.26); + + final Point2D p = new Point2D(x, y); + data.add(p); + } + + return new Graph(scale, data, "y = sin(x/2) + sin(x/1.26)", location); + } + + private static Graph getSinusGraph(final Point3D location) + throws IOException { + final List data = new ArrayList<>(); + for (double x = 0; x < 20; x += 0.25) { + final double y = Math.sin(x); + + final Point2D p = new Point2D(x, y); + data.add(p); + } + + return new Graph(scale, data, "Sinus", location); + } + + private static Graph getTangentGraph(final Point3D location) + throws IOException { + final List data = new ArrayList<>(); + for (double x = 0; x < 20; x += 0.25) { + double y = Math.tan(x); + + if (y > 2) + y = 2; + if (y < -2) + y = -2; + + final Point2D p = new Point2D(x, y); + data.add(p); + } + + return new Graph(scale, data, "Tangent", location); + } + + public static void main(final String[] args) throws IOException { + + final ViewFrame viewFrame = new ViewFrame(); + + final ShapeCollection geometryCollection = viewFrame.getView() + .getContext().getRootShapeCollection(); + + Point3D location = new Point3D(-600, -300, 0); + geometryCollection.addShape(getSinusGraph(location)); + + location = new Point3D(600, -300, 0); + geometryCollection.addShape(getFormula1Graph(location)); + + location = new Point3D(-600, 0, 0); + geometryCollection.addShape(getCosinusGraph(location)); + + location = new Point3D(600, 0, 0); + geometryCollection.addShape(getFormula2Graph(location)); + + location = new Point3D(-600, 300, 0); + geometryCollection.addShape(getTangentGraph(location)); + + location = new Point3D(600, 300, 0); + geometryCollection.addShape(getFormula3Graph(location)); + + viewFrame.getView().getContext().getAvatar() + .setLocation(new Point3D(0, 0, -500)); + + } +} diff --git a/src/main/java/eu/svjatoslav/sixth/e3d/examples/GridSpace.java b/src/main/java/eu/svjatoslav/sixth/e3d/examples/GridSpace.java new file mode 100755 index 0000000..6821cb5 --- /dev/null +++ b/src/main/java/eu/svjatoslav/sixth/e3d/examples/GridSpace.java @@ -0,0 +1,70 @@ +/* + * Sixth - System for data storage, computation, exploration and interaction. + * Copyright ©2012-2016, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 3 of the GNU Lesser General Public License + * or later as published by the Free Software Foundation. + */ + +package eu.svjatoslav.sixth.e3d.examples; + +import eu.svjatoslav.sixth.e3d.geometry.Point3D; +import eu.svjatoslav.sixth.e3d.gui.ViewFrame; +import eu.svjatoslav.sixth.e3d.renderer.raster.Color; +import eu.svjatoslav.sixth.e3d.renderer.raster.ShapeCollection; +import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.basic.line.LineAppearance; +import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.basic.solidpolygon.SolidPolygon; +import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.wireframe.Grid3D; + +class GridSpace { + + private static void addRandomPolygon(final ShapeCollection geometryCollection) { + final Point3D polygonLocation = getRandomPoint(1000); + + final double polygonAverageSize = 30; + + final Point3D point1 = new Point3D(polygonLocation); + point1.add(getRandomPoint(polygonAverageSize)); + + final Point3D point2 = new Point3D(polygonLocation); + point2.add(getRandomPoint(polygonAverageSize)); + + final Point3D point3 = new Point3D(polygonLocation); + point3.add(getRandomPoint(polygonAverageSize)); + + final Color color = new Color(Math.random(), Math.random(), + Math.random(), 0.5d); + + final SolidPolygon polygon = new SolidPolygon(point1, point2, point3, + color); + geometryCollection.addShape(polygon); + } + + private static Point3D getRandomPoint(final double amplitude) { + return new Point3D((Math.random() * amplitude * 2d) - amplitude, + (Math.random() * amplitude * 2d) - amplitude, (Math.random() + * amplitude * 2d) + - amplitude); + } + + public static void main(final String[] args) { + + final ViewFrame viewFrame = new ViewFrame(); + + final ShapeCollection shapeCollection = viewFrame.getView() + .getContext().getRootShapeCollection(); + + // add grid + final LineAppearance appearance = new LineAppearance(5, new Color(100, + 100, 255, 60)); + + shapeCollection.addShape(new Grid3D(new Point3D(1000, -1000, -1000), + new Point3D(-1000, 1000, 1000), 300, appearance)); + + // add random polygons + for (int i = 0; i < 3000; i++) + addRandomPolygon(shapeCollection); + + } +} diff --git a/src/main/java/eu/svjatoslav/sixth/e3d/examples/OctreeDemo.java b/src/main/java/eu/svjatoslav/sixth/e3d/examples/OctreeDemo.java new file mode 100755 index 0000000..9e1f3ef --- /dev/null +++ b/src/main/java/eu/svjatoslav/sixth/e3d/examples/OctreeDemo.java @@ -0,0 +1,183 @@ +/* + * Sixth - System for data storage, computation, exploration and interaction. + * Copyright ©2012-2016, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 3 of the GNU Lesser General Public License + * or later as published by the Free Software Foundation. + */ + +package eu.svjatoslav.sixth.e3d.examples; + +import eu.svjatoslav.sixth.e3d.geometry.Point3D; +import eu.svjatoslav.sixth.e3d.geometry.Transform; +import eu.svjatoslav.sixth.e3d.gui.ViewContext; +import eu.svjatoslav.sixth.e3d.gui.ViewFrame; +import eu.svjatoslav.sixth.e3d.gui.humaninput.WorldNavigationTracker; +import eu.svjatoslav.sixth.e3d.renderer.octree.OctreeVolume; +import eu.svjatoslav.sixth.e3d.renderer.octree.raytracer.Camera; +import eu.svjatoslav.sixth.e3d.renderer.octree.raytracer.LightSource; +import eu.svjatoslav.sixth.e3d.renderer.octree.raytracer.RayTracer; +import eu.svjatoslav.sixth.e3d.renderer.raster.Color; +import eu.svjatoslav.sixth.e3d.renderer.raster.ShapeCollection; +import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.basic.GlowingPoint; +import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.basic.line.LineAppearance; +import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.LightSourceMarker; +import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.solid.SolidPolygonRectangularBox; +import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.textcanvas.TextCanvas; +import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.wireframe.Grid3D; + +import java.awt.event.KeyEvent; +import java.io.IOException; +import java.util.Vector; + +public class OctreeDemo extends WorldNavigationTracker { + + private static final double magnification = 5; + private final LineAppearance gridAppearance = new LineAppearance(40, new Color(255, + 0, 0, 60)); + private final Vector lights = new Vector<>(); + private OctreeVolume octreeVolume; + private ShapeCollection shapeCollection; + private ViewContext context; + + public static void main(final String[] args) throws IOException { + new OctreeDemo().init(); + } + + private void addLight(final Point3D location, final Color color, + final float brightness) { + shapeCollection.addShape(new LightSourceMarker(new Point3D(location) + .scaleUp(magnification), color)); + + final LightSource lightSource = new LightSource(location, color, + brightness); + + lights.add(lightSource); + } + + private void dotSpiral() { + for (double i = 0; i < 20; i = i + .1) { + + double w = 1; + double h = 1; + + final double x = Math.sin(i) * 20f * h; + final double y = Math.cos(i) * 20f * w; + final double c1 = (Math.cos(i * 3f) * 100) + 127; + final double c2 = (Math.cos(i * 5.3332f) * 100f) + 127; + final double c3 = (Math.cos(i * 1.342f) * 100f) + 127; + + putPixel((int) x, (int) y, (int) (i * 4f), new Color((int) c1, + (int) c2, (int) c3, 255)); + } + } + + private void fractal(final int x, final int y, final int z, final int size, + final int step) { + final double c1 = (Math.cos(y / 7f) * 100f) + 127; + final double c2 = (Math.cos(x / 10f) * 100f) + 127; + final double c3 = (Math.cos(z / 12f) * 100f) + 127; + + putRect(x - size, y - size, z - size, x + size, y + size, z + size, + new Color((int) c1, (int) c2, (int) c3, 100)); + + if (size > 1) { + fractal(x, y - (size * 3), z, size / 2, step + 1); + fractal(x + (size * 3), y, z, size / 2, step + 1); + fractal(x, y, z + (size * 3), size / 2, step + 1); + } + } + + private void init() throws IOException { + + final ViewFrame viewFrame = new ViewFrame(); + context = viewFrame.getView().getContext(); + + context.getAvatar().setLocation(new Point3D(0, -30, -300)); + + octreeVolume = new OctreeVolume(); + + shapeCollection = context.getRootShapeCollection(); + + shapeCollection.addShape(new Grid3D( + new Point3D(-10000, -10000, -10000), new Point3D(10000, 10000, + 10000), 4000, gridAppearance)); + + // yellow light + addLight(new Point3D(20, -450, 240), new Color(255, 255, 255, 255), 100); + + // red light + addLight(new Point3D(-150, -116, 141), new Color(255, 0, 0, 255), 10); + + dotSpiral(); + + // arbitrary rectangles + putRect(-10, -10, -10, 10, 10, -20, new Color(200, 255, 200, 100)); + putRect(-3, 0, -30, 12, 3, 300, new Color(255, 200, 200, 100)); + putRect(-20, 20, -20, 20, 80, 20, new Color(255, 200, 255, 100)); + + tiledFloor(); + + fractal(-50, 20, 100, 32, 1); + + final TextCanvas message = new TextCanvas(new Transform(new Point3D( + -10, 20, -180)), "Press \"r\" to raytrace current wiew", + Color.WHITE, Color.PURPLE); + shapeCollection.addShape(message); + + context.getKeyboardFocusTracker().setFocusOwner(this); + context.getView().repaintDuringNextViewUpdate(); + } + + @Override + public void keyPressed(final KeyEvent event, final ViewContext viewContext) { + + if ('r' == event.getKeyChar()) { + raytrace(); + return; + } + super.keyPressed(event, viewContext); + } + + private void putPixel(final int x, final int y, final int z, + final Color color) { + shapeCollection.addShape(new GlowingPoint(new Point3D(x, y, z) + .scaleUp(magnification), 3 * magnification, color)); + octreeVolume.putCell(x, y, z, color); + + } + + private void putRect(final int x1, final int y1, final int z1, final int x2, + final int y2, final int z2, final Color color) { + + shapeCollection + .addShape(new SolidPolygonRectangularBox( + new Point3D(x1, y1, z1).scaleUp(magnification), + new Point3D(x2, y2, z2).scaleUp(magnification), color)); + + octreeVolume.fillRect3D(x1, y1, z1, x2, y2, z2, color); + } + + private void raytrace() { + // create and add camera object to scene + final Camera camera = new Camera(context.getAvatar(), magnification); + shapeCollection.addShape(camera); + + // initialize and start Raytracer in a separate thread + final RayTracer rayTracer = new RayTracer(camera.getTexture(), + octreeVolume, lights, camera, context.getView()); + final Thread thread = new Thread(rayTracer); + thread.start(); + } + + private void tiledFloor() { + final int step = 40; + final int size = step - 15; + for (int x = -200; x < 200; x += step) + for (int z = -200; z < 200; z += step) + putRect(x, 100, z, x + size, 110, z + size, new Color(255, 255, + 255, 100)); + } + +} diff --git a/src/main/java/eu/svjatoslav/sixth/e3d/examples/PointCloudDemo.java b/src/main/java/eu/svjatoslav/sixth/e3d/examples/PointCloudDemo.java new file mode 100644 index 0000000..04ae570 --- /dev/null +++ b/src/main/java/eu/svjatoslav/sixth/e3d/examples/PointCloudDemo.java @@ -0,0 +1,33 @@ +/* + * Sixth - System for data storage, computation, exploration and interaction. + * Copyright ©2012-2016, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 3 of the GNU Lesser General Public License + * or later as published by the Free Software Foundation. + */ + +package eu.svjatoslav.sixth.e3d.examples; + +import eu.svjatoslav.sixth.e3d.geometry.Point3D; +import eu.svjatoslav.sixth.e3d.geometry.Transform; +import eu.svjatoslav.sixth.e3d.gui.ViewFrame; +import eu.svjatoslav.sixth.e3d.renderer.raster.ShapeCollection; +import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.Galaxy; + +public class PointCloudDemo { + + public static void main(final String[] args) { + + final ViewFrame viewFrame = new ViewFrame(); + + final ShapeCollection geometryCollection = viewFrame.getView() + .getContext().getRootShapeCollection(); + + Transform transform = new Transform(new Point3D(0, -1000, 1000), 0, 0); + + // add galaxy + geometryCollection.addShape(new Galaxy(1000, 3, 10000, transform)); + + } +} diff --git a/src/main/java/eu/svjatoslav/sixth/e3d/examples/RainingNumbersDemo.java b/src/main/java/eu/svjatoslav/sixth/e3d/examples/RainingNumbersDemo.java new file mode 100644 index 0000000..5ffc730 --- /dev/null +++ b/src/main/java/eu/svjatoslav/sixth/e3d/examples/RainingNumbersDemo.java @@ -0,0 +1,82 @@ +/* + * Sixth - System for data storage, computation, exploration and interaction. + * Copyright ©2012-2016, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 3 of the GNU Lesser General Public License + * or later as published by the Free Software Foundation. + */ + +package eu.svjatoslav.sixth.e3d.examples; + +import eu.svjatoslav.sixth.e3d.geometry.Point3D; +import eu.svjatoslav.sixth.e3d.geometry.Transform; +import eu.svjatoslav.sixth.e3d.gui.ViewContext; +import eu.svjatoslav.sixth.e3d.gui.ViewFrame; +import eu.svjatoslav.sixth.e3d.gui.ViewUpdateListener; +import eu.svjatoslav.sixth.e3d.renderer.raster.Color; +import eu.svjatoslav.sixth.e3d.renderer.raster.ShapeCollection; +import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.AbstractShape; +import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.textcanvas.TextCanvas; + +import java.io.IOException; +import java.util.Collection; +import java.util.Random; + +public class RainingNumbersDemo implements ViewUpdateListener { + + private static final int NUMBERS_COUNT = 1000; + private final static int AREA = 600; + private final static int AREA_HALF = AREA / 2; + + public static void main(final String[] args) throws IOException { + new RainingNumbersDemo().run(); + } + + @Override + public boolean beforeViewUpdate(final ViewContext viewContext, + final int millisecondsSinceLastFrame) { + + final Collection shapes = viewContext + .getRootShapeCollection().getShapes(); + + final double translateAmount = millisecondsSinceLastFrame / 50d; + + shapes.stream().filter(shape -> shape instanceof TextCanvas).forEach(shape -> { + final TextCanvas block = (TextCanvas) shape; + final Point3D location = block.getLocation(); + location.translateY(translateAmount); + + if (location.y > AREA_HALF) + location.y -= AREA; + }); + + return true; + } + + private void run() throws IOException { + final ViewFrame viewFrame = new ViewFrame(); + + final ShapeCollection geometryCollection = viewFrame.getView() + .getContext().getRootShapeCollection(); + + Random random = new Random(); + + for (int i = 0; i < NUMBERS_COUNT; i++) { + final Point3D location = new Point3D((Math.random() * AREA) + - AREA_HALF, (Math.random() * AREA) - AREA_HALF, + (Math.random() * AREA) - AREA_HALF); + + final Color color = new Color(Math.random(), Math.random(), + Math.random(), Math.random()); + + final TextCanvas textCanvas = new TextCanvas( + new Transform(location), String.valueOf(random.nextInt(10)), color, + Color.TRANSPARENT); + + geometryCollection.addShape(textCanvas); + } + + viewFrame.getView().addViewUpdateListener(this); + } +} diff --git a/src/main/java/eu/svjatoslav/sixth/e3d/examples/SphereDemo.java b/src/main/java/eu/svjatoslav/sixth/e3d/examples/SphereDemo.java new file mode 100755 index 0000000..7fd62bc --- /dev/null +++ b/src/main/java/eu/svjatoslav/sixth/e3d/examples/SphereDemo.java @@ -0,0 +1,79 @@ +/* + * Sixth - System for data storage, computation, exploration and interaction. + * Copyright ©2012-2016, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 3 of the GNU Lesser General Public License + * or later as published by the Free Software Foundation. + */ + +package eu.svjatoslav.sixth.e3d.examples; + +import eu.svjatoslav.sixth.e3d.geometry.Point3D; +import eu.svjatoslav.sixth.e3d.gui.ViewContext; +import eu.svjatoslav.sixth.e3d.gui.ViewFrame; +import eu.svjatoslav.sixth.e3d.renderer.raster.Color; +import eu.svjatoslav.sixth.e3d.renderer.raster.ShapeCollection; +import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.basic.line.LineAppearance; +import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.basic.solidpolygon.SolidPolygon; +import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.wireframe.WireframeSphere; + +public class SphereDemo { + + private static final double WAVE_FREQUENCY = 50d; + private static final double WAVE_AMPLITUDE = 50d; + private static final Color SQUARE_PLATE_COLOR = new Color("88F7"); + + private static void makeSquarePlate(final ShapeCollection shapeCollection, + final double y, final double x, final double z) { + final Point3D p1 = new Point3D(x, y, z); + final Point3D p2 = new Point3D(x + 20, y, z); + final Point3D p3 = new Point3D(x, y, z + 20); + final Point3D p4 = new Point3D(x + 20, y, z + 20); + final SolidPolygon polygon1 = new SolidPolygon(p1, p2, p3, SQUARE_PLATE_COLOR); + final SolidPolygon polygon2 = new SolidPolygon(p4, p2, p3, SQUARE_PLATE_COLOR); + shapeCollection.addShape(polygon1); + shapeCollection.addShape(polygon2); + } + + /** + * @param surfaceElevation surface total elevation + */ + private static void makeWobblySurface(final ShapeCollection shapeCollection, + final double surfaceElevation) { + for (double x = -500; x < 500; x += 20) + for (double z = -500; z < 500; z += 20) { + + // use Pythagorean theorem to compute distance from the center + final double distanceFromCenter = Math.sqrt((x * x) + (z * z)); + + double plateElevation = Math.sin(distanceFromCenter / WAVE_FREQUENCY) * WAVE_AMPLITUDE; + + makeSquarePlate(shapeCollection, plateElevation + surfaceElevation, x, + z); + } + } + + public static void main(final String[] args) { + + final ViewFrame viewFrame = new ViewFrame(); + final ViewContext context = viewFrame.getView().getContext(); + + final ShapeCollection geometryCollection = context + .getRootShapeCollection(); + + final LineAppearance appearance = new LineAppearance(4, new Color(255, + 0, 0, 30)); + + // add sphere + geometryCollection.addShape(new WireframeSphere(new Point3D(0, 0, 0), + 100, appearance)); + + // create floor + makeWobblySurface(geometryCollection, 200); + makeWobblySurface(geometryCollection, -200); + + context.getAvatar().setLocation(new Point3D(0, 0, -340)); + + } +} diff --git a/src/main/java/eu/svjatoslav/sixth/e3d/examples/TextEditorDemo.java b/src/main/java/eu/svjatoslav/sixth/e3d/examples/TextEditorDemo.java new file mode 100644 index 0000000..e50c27f --- /dev/null +++ b/src/main/java/eu/svjatoslav/sixth/e3d/examples/TextEditorDemo.java @@ -0,0 +1,63 @@ +/* + * Sixth - System for data storage, computation, exploration and interaction. + * Copyright ©2012-2016, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 3 of the GNU Lesser General Public License + * or later as published by the Free Software Foundation. + */ + +package eu.svjatoslav.sixth.e3d.examples; + +import eu.svjatoslav.sixth.e3d.geometry.Point2D; +import eu.svjatoslav.sixth.e3d.geometry.Point3D; +import eu.svjatoslav.sixth.e3d.geometry.Rectangle; +import eu.svjatoslav.sixth.e3d.geometry.Transform; +import eu.svjatoslav.sixth.e3d.gui.ViewContext; +import eu.svjatoslav.sixth.e3d.gui.ViewFrame; +import eu.svjatoslav.sixth.e3d.gui.textEditorComponent.TextEditComponent; +import eu.svjatoslav.sixth.e3d.renderer.raster.Color; +import eu.svjatoslav.sixth.e3d.renderer.raster.ShapeCollection; +import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.basic.line.LineAppearance; +import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.wireframe.Grid2D; + +public class TextEditorDemo { + + private static Grid2D createGrid() { + final Transform transform = new Transform(new Point3D(0, 100, 0), 0, + Math.PI / 2); + + final Rectangle rectangle = new Rectangle(2000); + final LineAppearance appearance = new LineAppearance(10, new Color( + "00b3ad")); + + return new Grid2D(transform, rectangle, 10, 10, appearance); + } + + public static void main(final String[] args) { + + final ViewFrame viewFrame = new ViewFrame(); + final ViewContext viewContext = viewFrame.getView().getContext(); + + final ShapeCollection shapeCollection = viewFrame.getView() + .getContext().getRootShapeCollection(); + + shapeCollection.addShape(createGrid()); + + final double m = 1.5; + for (double z = -500 * m; z <= (500 * m); z += 250 * m) + for (double x = -500 * m; x <= (500 * m); x += 250 * m) { + + final TextEditComponent textEditor = new TextEditComponent( + new Transform(new Point3D(x, 0, z)), viewContext, + new Point2D(200, 120)); + + shapeCollection.addShape(textEditor); + } + + viewContext.getAvatar().setLocation(new Point3D(500, -300, -800)); + viewContext.getAvatar().setAngleXZ(0.6); + viewContext.getAvatar().setAngleYZ(-0.5); + + } +} diff --git a/src/main/java/eu/svjatoslav/sixth/e3d/examples/launcher/Applet.java b/src/main/java/eu/svjatoslav/sixth/e3d/examples/launcher/Applet.java new file mode 100644 index 0000000..a5b8c89 --- /dev/null +++ b/src/main/java/eu/svjatoslav/sixth/e3d/examples/launcher/Applet.java @@ -0,0 +1,28 @@ +/* + * Sixth - System for data storage, computation, exploration and interaction. + * Copyright ©2012-2016, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 3 of the GNU Lesser General Public License + * or later as published by the Free Software Foundation. + */ + +package eu.svjatoslav.sixth.e3d.examples.launcher; + +import javax.swing.*; + +public class Applet extends JApplet { + + private static final long serialVersionUID = 8159435871928091621L; + private boolean appletInitialized = false; + + @Override + public void init() { + if (!appletInitialized) { + + getContentPane().add(new MenuPanel()); + appletInitialized = true; + } + } + +} diff --git a/src/main/java/eu/svjatoslav/sixth/e3d/examples/launcher/LauncherFrame.java b/src/main/java/eu/svjatoslav/sixth/e3d/examples/launcher/LauncherFrame.java new file mode 100755 index 0000000..d8e6e52 --- /dev/null +++ b/src/main/java/eu/svjatoslav/sixth/e3d/examples/launcher/LauncherFrame.java @@ -0,0 +1,44 @@ +/* + * Sixth - System for data storage, computation, exploration and interaction. + * Copyright ©2012-2016, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 3 of the GNU Lesser General Public License + * or later as published by the Free Software Foundation. + */ + +package eu.svjatoslav.sixth.e3d.examples.launcher; + +import javax.swing.*; +import java.awt.*; + +class LauncherFrame extends javax.swing.JFrame { + + private static final long serialVersionUID = -3679656169594556137L; + + private LauncherFrame() { + super(); + initGUI(); + + } + + /** + * Auto-generated main method to display this JFrame + */ + public static void main(final String[] args) { + SwingUtilities.invokeLater(() -> { + final LauncherFrame inst = new LauncherFrame(); + final BorderLayout instLayout = new BorderLayout(); + inst.setLocationRelativeTo(null); + inst.setVisible(true); + inst.getContentPane().setLayout(instLayout); + }); + } + + private void initGUI() { + getContentPane().add(new MenuPanel()); + pack(); + setSize(390, 300); + } + +} diff --git a/src/main/java/eu/svjatoslav/sixth/e3d/examples/launcher/MenuPanel.java b/src/main/java/eu/svjatoslav/sixth/e3d/examples/launcher/MenuPanel.java new file mode 100644 index 0000000..f9b8653 --- /dev/null +++ b/src/main/java/eu/svjatoslav/sixth/e3d/examples/launcher/MenuPanel.java @@ -0,0 +1,240 @@ +/* + * Sixth - System for data storage, computation, exploration and interaction. + * Copyright ©2012-2016, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 3 of the GNU Lesser General Public License + * or later as published by the Free Software Foundation. + */ + +package eu.svjatoslav.sixth.e3d.examples.launcher; + +import eu.svjatoslav.sixth.e3d.examples.*; + +import javax.swing.*; +import javax.swing.GroupLayout.Alignment; +import javax.swing.LayoutStyle.ComponentPlacement; +import java.awt.event.ActionEvent; +import java.io.IOException; + +class MenuPanel extends JPanel { + private static final long serialVersionUID = 2012721856427052560L; + + public MenuPanel() { + + final JLabel lblNewLabel = new JLabel("Choose an example to launch."); + + final JButton btnNewButton = new JButton("Demo 1"); + btnNewButton.addActionListener(e -> { + }); + Action action = new SwingAction(); + btnNewButton.setAction(action); + + final JButton btnNewButton_1 = new JButton("Demo 2"); + Action action_1 = new SwingAction_1(); + btnNewButton_1.setAction(action_1); + + final JButton button = new JButton("New button"); + Action action_2 = new SwingAction_2(); + button.setAction(action_2); + + final JButton btnNewButton_2 = new JButton("New button"); + Action action_3 = new SwingAction_3(); + btnNewButton_2.setAction(action_3); + + final JButton btnNewButton_3 = new JButton("New button"); + Action action_4 = new SwingAction_4(); + btnNewButton_3.setAction(action_4); + + final JButton btnNewButton_4 = new JButton("New button"); + Action action_5 = new SwingAction_5(); + btnNewButton_4.setAction(action_5); + final GroupLayout groupLayout = new GroupLayout(this); + groupLayout + .setHorizontalGroup(groupLayout + .createParallelGroup(Alignment.LEADING) + .addGroup( + groupLayout + .createSequentialGroup() + .addContainerGap() + .addGroup( + groupLayout + .createParallelGroup( + Alignment.LEADING) + .addGroup( + Alignment.TRAILING, + groupLayout + .createSequentialGroup() + .addComponent( + lblNewLabel, + GroupLayout.PREFERRED_SIZE, + 426, + GroupLayout.PREFERRED_SIZE) + .addContainerGap( + GroupLayout.DEFAULT_SIZE, + Short.MAX_VALUE)) + .addGroup( + Alignment.TRAILING, + groupLayout + .createSequentialGroup() + .addGroup( + groupLayout + .createParallelGroup( + Alignment.TRAILING) + .addComponent( + btnNewButton_4, + Alignment.LEADING, + GroupLayout.DEFAULT_SIZE, + 331, + Short.MAX_VALUE) + .addComponent( + btnNewButton_3, + Alignment.LEADING, + GroupLayout.DEFAULT_SIZE, + 331, + Short.MAX_VALUE) + .addComponent( + btnNewButton_2, + Alignment.LEADING, + GroupLayout.DEFAULT_SIZE, + 331, + Short.MAX_VALUE) + .addComponent( + button, + Alignment.LEADING, + GroupLayout.DEFAULT_SIZE, + 331, + Short.MAX_VALUE) + .addComponent( + btnNewButton_1, + Alignment.LEADING, + GroupLayout.DEFAULT_SIZE, + GroupLayout.DEFAULT_SIZE, + Short.MAX_VALUE) + .addComponent( + btnNewButton, + GroupLayout.DEFAULT_SIZE, + 331, + Short.MAX_VALUE)) + .addGap(107))))); + groupLayout.setVerticalGroup(groupLayout.createParallelGroup( + Alignment.LEADING).addGroup( + groupLayout + .createSequentialGroup() + .addGap(7) + .addComponent(lblNewLabel, GroupLayout.PREFERRED_SIZE, + 58, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(ComponentPlacement.RELATED) + .addComponent(btnNewButton) + .addPreferredGap(ComponentPlacement.RELATED) + .addComponent(btnNewButton_1) + .addPreferredGap(ComponentPlacement.RELATED) + .addComponent(button) + .addPreferredGap(ComponentPlacement.RELATED) + .addComponent(btnNewButton_2) + .addPreferredGap(ComponentPlacement.RELATED) + .addComponent(btnNewButton_3) + .addPreferredGap(ComponentPlacement.RELATED) + .addComponent(btnNewButton_4) + .addContainerGap(137, Short.MAX_VALUE))); + setLayout(groupLayout); + + } + + private class SwingAction extends AbstractAction { + private static final long serialVersionUID = 5197962166765841015L; + + public SwingAction() { + putValue(NAME, "Text editors"); + putValue(SHORT_DESCRIPTION, "Some short description"); + } + + @Override + public void actionPerformed(final ActionEvent e) { + TextEditorDemo.main(null); + } + } + + private class SwingAction_1 extends AbstractAction { + private static final long serialVersionUID = -896479509963403828L; + + public SwingAction_1() { + putValue(NAME, "Wireframe sphere and ploygon landscape"); + putValue(SHORT_DESCRIPTION, "Some short description"); + } + + @Override + public void actionPerformed(final ActionEvent e) { + SphereDemo.main(null); + + } + } + + private class SwingAction_2 extends AbstractAction { + private static final long serialVersionUID = 8566009849873897321L; + + public SwingAction_2() { + putValue(NAME, "Raining numbers"); + putValue(SHORT_DESCRIPTION, "Some short description"); + } + + @Override + public void actionPerformed(final ActionEvent e) { + try { + RainingNumbersDemo.main(null); + } catch (final IOException e1) { + e1.printStackTrace(); + } + } + } + + private class SwingAction_3 extends AbstractAction { + private static final long serialVersionUID = -5369105936409884389L; + + public SwingAction_3() { + putValue(NAME, "Pointcloud galaxy"); + putValue(SHORT_DESCRIPTION, "Some short description"); + } + + @Override + public void actionPerformed(final ActionEvent e) { + PointCloudDemo.main(null); + } + } + + private class SwingAction_4 extends AbstractAction { + private static final long serialVersionUID = -8486796142555764460L; + + public SwingAction_4() { + putValue(NAME, "Mathematical graphs"); + putValue(SHORT_DESCRIPTION, "Some short description"); + } + + @Override + public void actionPerformed(final ActionEvent e) { + try { + GraphDemo.main(null); + } catch (final IOException e1) { + e1.printStackTrace(); + } + } + } + + private class SwingAction_5 extends AbstractAction { + private static final long serialVersionUID = -6210703594848004946L; + + public SwingAction_5() { + putValue(NAME, "Volumetric Octree"); + putValue(SHORT_DESCRIPTION, "Some short description"); + } + + @Override + public void actionPerformed(final ActionEvent e) { + try { + OctreeDemo.main(null); + } catch (final IOException e1) { + e1.printStackTrace(); + } + } + } +} diff --git a/src/main/java/eu/svjatoslav/sixth/e3d/examples/launcher/Standalone.java b/src/main/java/eu/svjatoslav/sixth/e3d/examples/launcher/Standalone.java new file mode 100755 index 0000000..0ddd9d4 --- /dev/null +++ b/src/main/java/eu/svjatoslav/sixth/e3d/examples/launcher/Standalone.java @@ -0,0 +1,22 @@ +/* + * Sixth - System for data storage, computation, exploration and interaction. + * Copyright ©2012-2016, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 3 of the GNU Lesser General Public License + * or later as published by the Free Software Foundation. + */ + +package eu.svjatoslav.sixth.e3d.examples.launcher; + +/** + * Main class to launch main menu with examples. + */ + +class Standalone { + + public static void main(final String[] args) { + LauncherFrame.main(args); + } + +} diff --git a/src/main/java/eu/svjatoslav/sixth/e3d/examples/package-info.java b/src/main/java/eu/svjatoslav/sixth/e3d/examples/package-info.java new file mode 100755 index 0000000..b95dd86 --- /dev/null +++ b/src/main/java/eu/svjatoslav/sixth/e3d/examples/package-info.java @@ -0,0 +1,15 @@ +/* + * Sixth - System for data storage, computation, exploration and interaction. + * Copyright ©2012-2016, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 3 of the GNU Lesser General Public License + * or later as published by the Free Software Foundation. + */ + +/** + * Example applications that make use of the API. + */ + +package eu.svjatoslav.sixth.e3d.examples; + diff --git a/src/main/resources/rebel.xml b/src/main/resources/rebel.xml new file mode 100644 index 0000000..5f75318 --- /dev/null +++ b/src/main/resources/rebel.xml @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/tools/open with IntelliJ IDEA b/tools/open with IntelliJ IDEA new file mode 100755 index 0000000..1f82875 --- /dev/null +++ b/tools/open with IntelliJ IDEA @@ -0,0 +1,6 @@ +#!/bin/bash + +cd "${0%/*}" + +cd .. +idea . diff --git a/tools/open with git-cola b/tools/open with git-cola new file mode 100755 index 0000000..8655908 --- /dev/null +++ b/tools/open with git-cola @@ -0,0 +1,7 @@ +#!/bin/bash + +cd "${0%/*}" + +cd .. + +cola diff --git a/tools/update web site b/tools/update web site new file mode 100755 index 0000000..8f63084 --- /dev/null +++ b/tools/update web site @@ -0,0 +1,27 @@ +#!/bin/bash +cd "${0%/*}"; if [ "$1" != "T" ]; then xterm -e "'$0' T"; exit; fi; + +# +# TODO: needs updating +# +# ( +# cd .. + +# mvn clean + +# mkdir -p target/website/codegraphs + +# mvn test package -e exec:java -Dexec.mainClass="eu.svjatoslav.sixth.DataGraph" -Dexec.classpathScope="test" + +# ( +# cd target/website/codegraphs/ +# meviz index -t Sixth +# ) + +# cp target/sixth.jar target/website/ + +# rsync -avz --delete target/website/ n0@svjatoslav.eu:/var/www/svjatoslav.eu/projects/sixth +# ) + +echo "Script finished. Press ENTER to close this terminal" +read