Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 06 Jul 2009
Offline Last Active Oct 01 2015 03:48 AM

Topics I've Started

Position constraints converging slowly (contacts)

10 September 2015 - 04:33 PM

I implemented an iterative constraint solver using impulses as described in Bender & Schmitt 2006:




Solving for the normal (penetration) constraint or the tangent constraint in isolation converges as expected, about 4-5 iterations before the penetration or tangent position is within the 'target' range (<0.0001). But running both constraints simultaneously causes 150+ iterations before they are both within target which sounds like too much for a single constraint, but maybe it is expected for a tight constraint?

Question about normal and tangent collision impulses

16 July 2015 - 11:11 AM

So I have separate equations that reliably give the normal collision impulse and the tangent friction impulse.


But one affects the other. Say I apply the normal impulse first, the separating velocity is now correct. Now I apply a tangential friction impulse. Now the separating velocity is more or less than the 'target' separating velocity. Maybe that's not a problem, but what if it becomes negative again? Do you loop around and re-calculate a new normal and tangent impulse, or leave it as is?

Quaternion slerp: is this correct result?

14 May 2015 - 01:01 PM

So I have 2 orientations represented by quaternions, q0 and q1:

q0 is equivalent to a pi/2 rotation around 0 0 1

q1 is equivalent to a pi/2 rotation around 1 0 0

v is a point attached to a rigid body in local coordinates 0 1 0

rotating by q0 takes v to -1 0 0

rotating by q1 takes v to 0 0 1

These two points lie on the XZ plane, so I would expect that an intermediate orientation between the two would also lie on the XZ plane (if we interpret the move from q0 to q1 as a rigid body motion). But when I slerp q0->q1 to a value between 0 and 1, the resulting quaternion has the right axis, but the angle of the rotation is not enough to bring the point all the way to the XZ plane.

Here's a sketchup showing what it looks like slerping q0->q1 to 0.75 and then applying that rotation to the original vector:


Would it make sense for me to develop on virtual machine? (And question on Linux distros)

16 September 2014 - 07:09 PM


I know virtualization is used if you are targeting something like a console, but in this case I am developing with desktop computers in mind: SDL2 for linux/windows/mac.


Currently I run Linux Mint, and have been programming on it, but I have been interested in running a virtual machine as I use this computer for other day-to-day purposes. Would a virtual machine allow a better 'sandbox' environment for my development purposes?


I have about 0 experience with setting up and running virtual machines; two options I have been made aware of are VirtualBox and LXC.


Mint serves my purposes fairly well and I recently upgraded to 17 Qiana (which should be supported for several more years). In building some open source repositories, I have found things like the gcc included in buildessential may not be the latest version (I have 4.8.2, it appears I would have to manually install the latest 4.9.1). Does the 'rolling distro' nature of Arch make it easier to stay up-to-date on these things? or does it merely mean that I would never have to 'install' a new version of Arch?

Many to one relation in an SQLite database

14 December 2013 - 12:45 PM

I am converting a spreadsheet of game notes into a database.

I have a table of character Classes for an RPG (fighter, mage, etc)

One of the columns shows the Races that a Class can be in a comma seperated list:

ClassId       ClassName     Race 
------------- ------------- ------------
1             Rogue         Man           
2             Mage          Man,Elf       
3             Warrior       Man,Dwarf,Elf

I'm new to SQL and not sure how to translate this into a database file.


Here is what I'm thinking:


1.  I make a 3rd table that holds the relation.


I think this is the most proper solution. The drawback for me are that I would have to create and manage an extra table.  Also, to me the comma separated list like seen above is the preferable way for me to display the data and I'm not sure what other ways there would be to display the three possible Races together on one row (I don't think SQL/SQLite has syntax to concatenate strings or build lists?)


2.  I make a column for each race and use a boolean 0 or 1 value


This could be pretty clear. The only disadvantage I see is that I would have to create new columns whenever adding new races.


3.  I just leave the Race column as a comma seperated value


I could still query the column with statements like

select * from Class where Race like '%Elf%';

But I think this would make it hard to put any kind of constraints on the field (like a FOREIGN KEY constraint to make sure the Race exists in the Race table).


Thoughts or suggestions are appreciated.