Browse Source

complete besdies exhibition

master
cailean 4 months ago
parent
commit
4ab6ebdfb4
  1. BIN
      bin/data/new_tree.bin
  2. BIN
      bin/image-to-mesh
  3. 2
      src/Bullet.cpp
  4. 6
      src/Bullet.h
  5. 8
      src/ofApp.cpp

BIN
bin/data/new_tree.bin

Binary file not shown.

BIN
bin/image-to-mesh

Binary file not shown.

2
src/Bullet.cpp

@ -126,7 +126,7 @@ void Bullet::update(bool& is_controller_active, Node& chosen_node, vector<Node*>
float vel_magnitude = glm::length(camera_velocity);
static float current_zoom = 0.05f;
float target_zoom = ofMap(vel_magnitude, 0, MAX_VELOCITY, 0.05, 0.3, true);
current_zoom = current_zoom + (target_zoom - current_zoom) * 0.1f;
current_zoom = current_zoom + (target_zoom - current_zoom) * 0.05f;
// Calculate scale-out factor if we're in random walk mode
if (random_walk_time > SCALE_OUT_START_TIME) {

6
src/Bullet.h

@ -170,10 +170,10 @@ class Bullet{
const float RANDOM_WALK_RADIUS = 450.0f;
const float RANDOM_WALK_SPEED = 40.0f; // Adjust for slower/faster movement
const float TARGET_REACHED_DISTANCE = 5.0f;
const float RANDOM_WALK_DELAY = 10.0f; // 5 seconds delay
const float RANDOM_WALK_DELAY = 30.0f; // 5 seconds delay
const float SCALE_OUT_START_TIME = 30.0f; // When to start scaling out
const float SCALE_OUT_DURATION = 60.0f; // How long to scale out
const float SCALE_OUT_START_TIME = 10.0f; // When to start scaling out
const float SCALE_OUT_DURATION = 20.0f; // How long to scale out
const float INITIAL_SCALE = 0.05f; // Starting scale
const float TARGET_SCALE = 0.2f; // Final scale

8
src/ofApp.cpp

@ -137,7 +137,7 @@ void ofApp::update(){
}
if(current_time - last_updated_time >= 0.1){
if(current_time - last_updated_time >= 1.0){
buildKDTree();
getNearestImages();
last_updated_time = current_time;
@ -187,7 +187,7 @@ void ofApp::update(){
}
if(ofGetElapsedTimef() > tsne_start_time + TNSE_DURATION){
tsne_iter_idx = (tsne_iter_idx + 1) % 9;
tsne_iter_idx = (tsne_iter_idx + 1) % 3;
updateTSNEPositions(nodes);
}
}
@ -598,8 +598,8 @@ void ofApp::createNodes(std::string json_path){
tsne_points = tsne.run(tsne_input, dims, perplexity, theta, normalise, runManually);
// Option 1: Using nested loops
for(size_t i = 0; i < 9; i++) {
for(size_t t = 0; t <= 100; t++) {
for(size_t i = 0; i < 3; i++) {
for(size_t t = 0; t <= 300; t++) {
tsne_points = tsne.iterate();
}
point_iterations.push_back(tsne_points);

Loading…
Cancel
Save