How to make text into a rigid body?
              in 
             Programming Questions 
              •  
              2 years ago    
            
 
           
             Hello all,
            
            
I have been conducting a few experiments with the fisica and geomerative libraries to try and create rigid bodies that are infact made up of single characters of text. I first started by using plain jpegs, which if course just built a bounding box around the entire image, and then looked into SVG's but the examples given for SVG usage in fisica+geomerative seem to be very buggy and inconsistent, with the code executing fine, but no images appeared on the canvas and the error
            
            
            
I have tried searching around the forums, and openprocessing.org trying to gain an idea on how to achieve such a thing but to no avail.
            
If anyone would have any previous attempted or advice to get me started. Cheers.
 
           
 
            
           I have been conducting a few experiments with the fisica and geomerative libraries to try and create rigid bodies that are infact made up of single characters of text. I first started by using plain jpegs, which if course just built a bounding box around the entire image, and then looked into SVG's but the examples given for SVG usage in fisica+geomerative seem to be very buggy and inconsistent, with the code executing fine, but no images appeared on the canvas and the error
- Found invalid polygon, 
 sides are too close to parallel.
 Didn't add unusable polygon. Dumping vertices:
 float xv[] = {-0.039218f,-0.039218f,-0.039218f,};
 float yv[] = {0.412512f,0.111878f,0.412512f,};
 Found invalid polygon,
 sides are too close to parallel.
              continually returned.
             
             
As a small example I am basically trying to make a bounding box go around the contour of a character. Such as "A". So when added to a physics engine and say fall on it's side the diagonal of the A character would be touching the ground, and not simply appear to have been rotated 90 degrees.
            
            As a small example I am basically trying to make a bounding box go around the contour of a character. Such as "A". So when added to a physics engine and say fall on it's side the diagonal of the A character would be touching the ground, and not simply appear to have been rotated 90 degrees.
I have tried searching around the forums, and openprocessing.org trying to gain an idea on how to achieve such a thing but to no avail.
If anyone would have any previous attempted or advice to get me started. Cheers.
 
              
              1  
            
 
            
 
 
          