Score
0
Watch 4 Star 12 Fork 1

PhysIKATeam / PhysIKAC/C++GPL-2.0

Create your Gitee Account
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
Clone or download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

master: Build Status dev: Build Status

Introduction

PhysIKA is an open source node-based architecture targeted at real-time simulation of versatile physical materials. Currently, it supports simulating physical phenomena ranging from fluids, elastic objects and fracture, etc. It is higly modualized and can also help the research community develop more novel algorithms.

Getting Started

The following instructions will guide you to set up an simple elastic object.

Prerequisites

  • CUDA 9.0 +
  • CMake 3.12 +

Installing

  • Download the source code;
  • Run cmake and set up both "Where is the source code" and "Where to build the binaries";
  • Click Configure;
  • If succeeded, then click Generate.

Runing an example

The following example shows how to create an elastic bunny within less than 30 lines of codes.

#include <iostream>
#include "GUI/GlutGUI/GLApp.h"
#include "Framework/Framework/SceneGraph.h"
#include "Dynamics/ParticleSystem/ParticleElasticBody.h"
#include "Dynamics/ParticleSystem/StaticBoundary.h"

using namespace Physika;

int main()
{
	SceneGraph& scene = SceneGraph::getInstance();

	std::shared_ptr<StaticBoundary<DataType3f>> root = scene.createNewScene<StaticBoundary<DataType3f>>();
	root->loadCube(Vector3f(0), Vector3f(1), true);

	std::shared_ptr<ParticleElasticBody<DataType3f>> bunny = std::make_shared<ParticleElasticBody<DataType3f>>();
	root->addParticleSystem(bunny);
	bunny->getRenderModule()->setColor(Vector3f(0, 1, 1));
	bunny->setMass(1.0);
	bunny->loadParticles("../Media/bunny/bunny_points.obj");
	bunny->loadSurface("../Media/bunny/bunny_mesh.obj");
	bunny->translate(Vector3f(0.5, 0.2, 0.5));
	bunny->setVisible(false);

	GLApp window;
	window.createWindow(1024, 768);

	window.mainLoop();

	return 0;
}

The following image shows an screenshot of the running example

Contributers

Current developers:

  • He Xiaowei - Institute of Software, CAS
  • Xu Liyou - Peking University
  • Chen Xiaosong Tsinghua University

See also the list of contributors who are currently participated in this project.

Former developers:

  • Chen Wei
  • Zhu Fei
  • Yang Sheng
  • Zhang Tianxiang

License

This project is licensed under the GNU License - see the LICENSE file for details

Comments ( 0 )

Sign in for post a comment

About

PhysIKA: Physics-based Interactive Kinematics Architecture. 物理仿真,流体、形变体、碎裂、SPH、Peridynamics spread retract
C/C++ and 6 more languages
GPL-2.0
Cancel

Releases

No release

Gitee Metrics

Contributors

All

Activities

load more
can not load any more