dilevin / csc417-a1-mass-spring-1d Goto Github PK
View Code? Open in Web Editor NEWAssignment 1 on one-dimensional mass spring systems for CSC2549, at the University of Toronto
Assignment 1 on one-dimensional mass spring systems for CSC2549, at the University of Toronto
I tried to compile the starter code on teach.cs through a remote login and got this error.
I was using the NX client to login remotely. Did anybody else get something similar? I am also taking CSC419 and this happens when I compile their starter code for the first assignment, so it might have to do with using the libigl library through a remote connection (or it could just be my computer).
Thanks!
Are we allowed to compare the simulation results (Eg recording the libigl window, sharing the .exe+.ilk+.pdb files made by command line) with classmates?
Hey, Not sure if we need this at all but playing around with the UI I noticed selecting show faces labels crashes it. See below:
This was output in shell:
Assertion failed: draw_list->_VtxCurrentIdx < (1 << 16) && "Too many vertices in ImDrawList using 16-bit indices. Read comment above", file C:\Users\sabba\source\repos\csc417_a1\extern\libigl\external\imgui\imgui.cpp, line 3725
If so, I don't know how to compute the force by using only the coordinate and the velocity. Is there any hint?
Anyone have advice on testing our time integrations other than comparing the phase graphs?
Sorry that the function handle force
and stiffness
should take 3 variables as input instead:
force(f, q, qdot) - a function that computes the force acting on the mass as a function. This takes q and qdot as input parameters. f is the output force.
stiffness(k, q, qdot) - a function that computes the stiffness (negative second derivative of the potential energy). This takes q and qdot as input parameters. k is the output stiffness.
This isn't an issue - rather help for others seeking to do a debug build on a stock install of Ubuntu 18.04 with nvidia drivers. You have to make sure the OpenGL header files are installed as well as a handfull of other dependencies or you cmake with -DCMAKE_BUILD_TYPE=Debug will fail. I imagine if you use the CDF machines, this is a non-issue as all the packages are most likely installed there.
Those packages are:
mesa-comon-dev
libgl1-mesa-dev
libglu1-mesa-dev
x11proto-dev
libxrandr-dev
libxinerama-dev
libxcursor-dev
libxi-dev
You can't pass R-Type references to the force or stiffness functions unless q and qdot are constants. This issue means that you cant use some features of Eigen.
To fix it you have to change
auto force = [](Eigen::VectorXd &f, Eigen::VectorXd &q, Eigen::VectorXd &qdot) { dV_spring_particle_particle_dq(f, q, stiffness); f *= -1; };
auto stiff = [](Eigen::MatrixXd &k, Eigen::VectorXd &q, Eigen::VectorXd &qdot) { d2V_spring_particle_particle_dq2(k, q, stiffness); k *= -1; };
to
auto force = [](Eigen::VectorXd &f, const Eigen::VectorXd &q, const Eigen::VectorXd &qdot) { dV_spring_particle_particle_dq(f, q, stiffness); f *= -1; };
auto stiff = [](Eigen::MatrixXd &k, const Eigen::VectorXd &q, const Eigen::VectorXd &qdot) { d2V_spring_particle_particle_dq2(k, q, stiffness); k *= -1; };
It will make it easier for other people to find solutions to common problems.
I'm not sure if I should have opened an issue on the main course page, but since these are specific to A1, I'll leave them here:
Both books are used at UofT. I have not taken any physics courses nor numerical methods courses, so I found these resources particularly helpful in understanding the first lecture recording and for A1.
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.