Transform asteroid rotation to heliocentric ecliptic coordinates I'm working with data from the DAMIT database of asteroid shape models.  I'm adding them to a visualization in which the sun is at [0, 0, 0] and the X, Y axes constitute the ecliptic plane of the solar system.

Each asteroid model comes with some attributes that define its orientation and spin:


λ (ecliptic longitude), 
β (ecliptic latitude)
P (sidereal rotation period)
φ0 (initial rotation angle)
JD0 (initial date).


I've applied the matrix formulas suggested by the folks at DAMIT:



in which



This is where I get confused.  My understanding is that my visualization uses a heliocentric ecliptic coordinate system.

I set r_ast to the XYZ location of a vertex in my visualization.  I'm not sure this is correct.

Then I compute r_ecl from the equation above.  But I think variables λ and β are angles in a geocentric ecliptic coordinate system and I need to do some transformation into heliocentric ecliptic coordinates.

Is my approach correct and if so, how can I convert the asteroid's rotation to my visualization's heliocentric ecliptic coordinate system?
r_ast is a vector that goes from the center of the asteroid to each vertex of the shape model as if you had stuck a set of rods in the center of a potato and pointing along the long axis, to the pole on top and 90 degrees to these to give X,Y,Z directions. 

The matrices above that you give then transform these r_ast vectors for the co-ordinates of the surface of the asteroid into the ecliptic plane as a function of time as the asteroid rotates, giving you r_ecl. It says in the Kaasalainen paper (I think) that r_ecl has an origin shifted to the center of the asteroid. If you are wanting a visualization of what the asteroid looks like relative to the Earth or Sun etc, then you will need to calculate the Sun->asteroid vector and the Sun->Earth vector using e.g. JPL HORIZONS and using the Vector Table ephemeris type or a programmatic wrapper to this (e.g. astroquery) or the NAIF SPICE toolkit and getting or generating a SPK kernel file for the asteroid (the normal e.g. de430.bsp JPL planetary ephemeris will handle the Sun->Earth part)