bb4 / bb4-simulations Goto Github PK
View Code? Open in Web Editor NEWA collection of java simulations. Examples include reaction diffusion, fractals, henon phase exploration, snakes, dice, and fluid flow.
License: MIT License
A collection of java simulations. Examples include reaction diffusion, fractals, henon phase exploration, snakes, dice, and fluid flow.
License: MIT License
This would make a cool simulation:
https://www.youtube.com/watch?v=qhbuKbxJsk8
Have to click reset a few times. Looks to only be partially resetting.
Use state space search to simulate a car parallel parking.
Goal: optimize the structure in the simulation, the build physical lego trebuchet based on it.
From SIGGRAPH paper by Gavin Miller
This is a pretty straightforward mechanical change. I already did it for bb4-common.
change dependency in gradle file.
remove "extends from TestCase" in test classes.
Add @test annotation to test methods.
Use static import for assertTrue etc.
When checked, the tree should auto fit to the dimensions of the screen when parameters are changed. Also the scale scrollbar should probably be disabled.
Use PCG (Procedural Content Generation) to automatically generate rooms in a dungeon.
Inspired by my son's work in hi pixel-perfect game that he wrote in C#.
Implementation will proceed in these phases:
perhaps provide a dropdown for variaous predefined initial configurations or allow the user to design the initial condition by "painting" the starting chemical concentrations.
Currently, the runs fail too easily resulting in a black screen.
Either they should not fail or they should fail with more diagnostic/visual information about why they fail.
Maybe some constraints ca be relaxed so that they can be allowed to proceed with minor inconsistencies.
The controls on the right should be organized into tabs where each tab has the controls for one of the animals.
The tab title should have the name of the animal and an icon representing it.
Add a span button to add mroe of something in case it goes to 0.
e.g.
add [5] - if too few
kill [4] - if too many
Since the algorithm fails often, we could run simulations in parallel and take the first one that succeeds.
Another option to avoid failure might be to run until failure, then progressively backtrack until a solution can be found (if it is possible).
The rendering gets all staticy and messed up when moving the controls on the right, or when dragging the cursor to decrease cave height.
See com.barrybecker4.simulation.water.ui.WaterSimulator.scala
Need to make the grid bigger or smaller.
Different initial parameter values, and different chemical concentrations.
I often get a stack trace like this
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at com.barrybecker4.simulation.waveFunctionCollapse.model.wave.Wave.doPropagation(Wave.scala:147)
at com.barrybecker4.simulation.waveFunctionCollapse.model.wave.Wave.propagate(Wave.scala:139)
at com.barrybecker4.simulation.waveFunctionCollapse.model.WfcModel.$anonfun$advance$2(WfcModel.scala:65)
at scala.collection.immutable.Range.foreach$mVc$sp(Range.scala:190)
at com.barrybecker4.simulation.waveFunctionCollapse.model.WfcModel.advance(WfcModel.scala:59)
at com.barrybecker4.simulation.waveFunctionCollapse.model.WfcModel.runWithLimit(WfcModel.scala:43)
at com.barrybecker4.simulation.waveFunctionCollapse.model.WfcModel.startRun(WfcModel.scala:49)
at com.barrybecker4.simulation.waveFunctionCollapse.DynamicOptions.runModel(DynamicOptions.scala:248)
at com.barrybecker4.simulation.waveFunctionCollapse.DynamicOptions.itemStateChanged(DynamicOptions.scala:261)
at java.desktop/javax.swing.JComboBox.fireItemStateChanged(JComboBox.java:1227)
at java.desktop/javax.swing.JComboBox.selectedItemChanged(JComboBox.java:1279)
In the Verhulst simulation it would be nice to show the bifurcation diagram generated.
See
http://en.wikipedia.org/wiki/Pierre_Fran%C3%A7ois_Verhulst
http://commons.wikimedia.org/wiki/File:Verhulst-Mandelbrot-Bifurcation.jpg
http://www.iiis.org/cds2010/cd2010sci/sci_2010/paperspdf/sa678rl.pdf
I have always wanted to add a simulation like what Karl Sims did in his "Evolving Virtual Creatures" SIGGRAPH paper. It was very inspirational to me when I attended his presentation back in 1994.
http://www.karlsims.com/evolved-virtual-creatures.html
This would control the speed of the animation
Currently a black window shows and you need to click something to get it running.
I think it would be better to show some animation immediately.
Add scala port of code (done)
Add new simulator
Refactor and make clean
Consider making this interactive version in the explorer
WebGl 3d version.
It's too small compared to simple tiled model
Probably showing 4 pixels for 1 is good. maybe there could be a slider.
There is a bug where for overlapped models, then do not show that animation.
The tile models do.
So far I have "bsp" and "unionGraph".
The next idea to implement is "organic".
For this approach, we will start with one room and then sprout other connected rooms out from it until the available dungeon area is completely filled. Additional connections, besides just those to the root, can be added as we go depending on the value of the connectivity param. This approach will have a couple of advantages:
Here is the general approach:
This is anothor paper by Karl Sims that I would like to add as a simulation.
http://www.karlsims.com/genetic-images.html
Its amazing the diversity of patterns that can be generated by this genetic algorithm.
Popular computer project.
See http://en.wikipedia.org/wiki/Conway's_Game_of_Life
The current snake is pretty short. It would be nice to have some longer versions.
Exception in thread "Thread-18" java.lang.IndexOutOfBoundsException: Index: 6, Size: 6
at java.util.ArrayList.rangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at com.barrybecker4.ui.util.ColorMap.getColorForValue(ColorMap.java:60)
at com.barrybecker4.simulation.common.rendering.ModelImage.updateImage(ModelImage.java:72)
at com.barrybecker4.simulation.fractalexplorer.FractalExplorer.timeStep(FractalExplorer.java:119)
at com.barrybecker4.ui.animation.AnimationComponent.run(AnimationComponent.java:91)
at java.lang.Thread.run(Unknown Source)
Currently, only 100% consistent adjacencies are allowed.
I speculate that if we allow some inconsistent patterns with very low probability, then we will be far less likely to encounter problems where the algorithm cannot continue because it reaches an inconsistency.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.