Category Archives: Feldman Project

Phil 3.21.12

8:00 – 3:00 FP

  • Now that the basic framework is put together, adding in the hand. Starting with making shiny cubes and cylinders.
  • When making textures, *don’t* compress your tga files!
  • Added a color modulated reflection shader. This will probably be our main shader for charts, too.
  • Need to add a bit of lighting to the shiny objects. Going to finish building the hand fist.
  • In the process of debugging RightHand::drawPrimitive().

Phil 3.20.12

8:00 – 5:30 FP

  • Spring! That bears repeating. Spring!
  • Working on the hand
  • Building a new FLTK widget to show
    • Communication with Arduino
    • Force on each finger
    • Volume for each finger
    • Sound for each finger
    • Hand view
  • Now I need to wire up the controls
  • Added pointers to the pressure and volume sliders as well as the sound text within the FingerIO helper class. Works well.
  • Wiring up the text output – done. Wound up using a simple multiline Fl_Output class rather than a Fl_Text_Output because when I tried to add a buffer, the code kept crashing trying to create a callback. Not sure that I was making the call in the right place?

Tom DeVito 3.19.2012

Start: 10:15(actually got to the office at 8:30 but forgot I had a doctors appointment)

  • Re-familarizing myself with the Arduino code
  • Started rebuilding the controllers to work with the new communication systems
  • Most of the broad building  of the controllers are complete.  Need to talk about the specifics like commands and stuff.

End:7:15  (My brother needed me to pick up my niece at school at 1:30.  This took about an hour)

Phil 3.19.12

8:00 – 10:30 VISIBILITTY/OH

  • Stopped in to talk to Al F. Things are proceeding apace, apparently.

10:30 – 12:00, 3:00 – 5:00 FP

  • Getting started on the final(?) version of the hand
  • Need to talk to Tom about coding up the arduino, but today’s schedule may not allow. Tomorrow?

Phil 3.16.12

7:30- 9:30 OH/VISIBILITY

  • Stopped by our servers to send Al Ferguson a note asking about positions. While there, I moved the map server over from Jeff’s machine to the integration server
  • Talked to Dong about getting started on charting now that the main pieces of the OGL 3.0+ libraries are written.

9:30 – 2:30 FP

  • Went to UMBC to meet the prototyping support group. It’s nice, there are a couple of makerbots, a laser cutter and several other interesting items. Also, it looks like CCBC has a much bigger lab that you can take a $50 training course on and then have access to. Need to check into that.
  •  Starting on building the hand visualization using the new library. First thing I need to do is make a new FLTK window that shown communication with the arduino.

Tom DeVito 3.14.2012

Start: 10:00

  • Tested using the power adapter as a power supply.  This test worked well and I believe the 2 amp ceiling is high enough to power the amplifiers and midi boards.
  • Need to try the test with an audio signal.
  • Looking at the most recent sketch which utilizes the recent communication and controller code, I noticed that it was missing some components which were essential to making sounds.
  • Added in the various classes can changed their parameters to all be 0-100 for easy use with simulation variables.
  • The code is working.  I need to do a longer test to make sure the current doesn’t over heat anything.

End: 6:00

Phil 3.14.12

8:00 – 4:30 FP

  • Happy PI day! I wonder if there will be bigger celebrations in 2015?
  • Back to building libraries.
    • Release Library is done.
  • Adding test project to solution that tests the library
    • Discovered that a dll was probably not the way to go, so changed the project settings so that it now generated a static library. For once, that was pretty straightforward – Properties->Configuration Properties->General->Configuration Type and select from the dropdown.
    • Everything is compiling and linking, adding some actual content now.
    • Well I’ll be damned – everything works (In debug and release mode!).
  • Same old picture, but with much better foundations:
  • Installed AtomineerUtils, a nifty plugin if Visual Studio that generates documentation frameworks

Tom DeVito 3.13.2012

Start: 10:15

  • Fixed a problem with the mounting holes being to small.  I forgot that the size only effects the size of the pad not the hole through the borad.
  • Moved the Midi and Reset pins and rerouted their traces
  • Moved the audio traces between amplifiers.
  • I have checked the circuit and it looks good.  Once I check that the power supply will work, I’ll be ready to order.

End 6:15

Phil 3.13.12

8:00 – 1:00 FP

  • Working on turning the base classes of ShaderLearning2 into a library
  • Creating DLL and static libraries in Visual Studio 2010: http://msdn.microsoft.com/en-us/library/bb384835.aspx
  • Adding copies of headers and libs to the dll project. Trying to make this self-contained.
    • Added include directories to properties
    • Added lib directories to properties
    • Added the following additional dependencies under Linker->Input->Additional Dependencies:
      • opengl32.lib
        glu32.lib
        fltkgl.lib
        FLTKD.LIB
        WSOCK32.LIB
        gltools.lib
    • Yay! My test (Dprintf) is compiling and linking. Onward!
    • Added the following to the “Ignore Specific Libraries”
      • msvcrt.lib
        LIBCMT.lib
    • Done with the debug version of the library, need to verify that it works, then do the release version.

1:00 – 4:00 VISIBILITY

  • Demo – 2, actually. It went well, though we do need to add a ‘loading’ screen to the main project screen. It hung for an awkwardly long time.

Tom DeVito 3.12.2012

Start 9:30

  • I was missing the decoupling capacitors between the two amps.
  • I forgot that the SVR line needs to be grounded with a capacitor.
  • Reoriented the chips to be vertical.  Its much easier to tell if they are wired right.
  • Traced the connection.  It looks like everything is in there now.

End 5:30

Phil 3.12.12

8:00 – 1:00 FP

  • DST == sleeeeeeepy
  • Class from 10:00 – 12:00
  • Going to start converting the hand to the new framework. I need to put some of these parts in a library.
  • Cool thing for the day: http://vimeo.com/36579366

1:00 – 4:00 VISIBILITY

  • Demo prep. Need to build a spreadsheet that has projects and timelines on them. Have a “most recent issue” column. Maybe a “number of times underbudget”  and “number of times late” columns as well
  • The demo is now tomorrow at 2:00, though Dukes will not be there. So it looks like we will have an additional meeting/demo.
  • Spent some time walking Sherry P through VISIBILITY and created an account for her on fgmdev Viztool

Tom DeVito 3.9.2012

Start 11:00

  • Fixed a problem with the pre-amp circuits where I had the pins connected backwards.
  • Fixed some minor errors.  There were some spots that the bottom traces were inadvertently attached to the top by a through hole.
  • wiring up the test to make sure the power supply will work.

End: 6:00

 

Phil 3.9.12

8:00 – FP

  • Chasing down why the refresh rate drops after using glGetQueryObjectiv(drawQuery, GL_QUERY_RESULT, &result);
    • Adding a check to test that the result is available before pulling it.
    • Changed the code so that the hit test is only called once per mouse click. Not sure why that would fix it, but I’m not complaining.
    • Cleaned up and working. Example code for how to do non-fixed pipeline picking in OpenGL shown below:
// Code to show how to use object queries to get picking behavior. For this code to work,
// You'll need to add your preferred rendering framework. This code was pulled from an
// FLTK framework I've been building for data visualization

// Class-wide global variables here for the sake of a compact file
// Classes that are not part of the OpenGl library are from the OpenGl SuperBible,
// which I highly reccomend: http://www.starstonesoftware.com/OpenGL/

GLMatrixStack modelViewMatrix;
GLMatrixStack projectionMatrix;
GLFrustum viewFrustum;
bool isPicking;

// Constructor. Set up picking and the projection and model matrices
PickingExample::PickingExample(int x,int y,int w,int h,const char *l)
: Fl_Gl_Window(x,y,w,h,l)
{
	isPicking = false;
	pickQueryResult = READY;
	glGenQueries(1, &pickQueryID);
	if(pickQueryID == 0){
		pickQueryResult = PICK_ERROR;
	}

	viewFrustum.SetPerspective(45.0f, (float)screenWidth/(float)screenHeight, 0.5f, 1000.0f);
	projectionMatrix.LoadMatrix(viewFrustum.GetProjectionMatrix());
	modelViewMatrix.LoadIdentity();
}

// A slightly modified version of the original gluPickMatrix, taken from:
// http://oss.sgi.com/cgi-bin/cvsweb.cgi/projects/ogl-sample/main/gfx/lib/glu/libutil/project.c?rev=1.4;content-type=text%2Fplain
void PickingExample::setPickMatrix(GLdouble x, GLdouble y, GLdouble deltax, GLdouble deltay, GLint viewport[4])
{
	if (deltax <= 0 || deltay <= 0) {
		return;
	}

	projectionMatrix.LoadIdentity();

	/* Translate and scale the picked region to the entire window */
	GLfloat dx = (float)((viewport[2] - 2 * (x - viewport[0])) / deltax);
	GLfloat dy = (float)((viewport[3] - 2 * (y - viewport[1])) / deltay);
	projectionMatrix.Translate(dx, dy, 0);
	projectionMatrix.Scale((float)(viewport[2] / deltax), (float)(viewport[3] / deltay), 1.0);

	projectionMatrix.MultMatrix(viewFrustum.GetProjectionMatrix());
}

// the main drawing method. In this case, only drawing for picking is done, though it would 
// be easy enough to glClear() afther the picking code, and draw everything  over again with 
// a normal perspective
void PickingExample::draw() {
	GLint result;
	GLint viewport[4];
	glGetIntegerv(GL_VIEWPORT,viewport);

	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
	modelViewMatrix.PushMatrix();

		// Have some Euler angle rotations and translations just to show how
		// setPickMatrix() doesn't care about eye or model position

		// global eye transformations
		modelViewMatrix.Rotate(eyeOrient[1], 0, 1, 0);
		modelViewMatrix.Rotate(eyeOrient[0], 1, 0, 0);
		modelViewMatrix.Translate(eyePos[0], eyePos[1], eyePos[2]);

		// global world transformations
		modelViewMatrix.Translate(worldPos[0], worldPos[1], worldPos[2]);
		modelViewMatrix.Rotate(worldOrient[0], 1, 0, 0);
		modelViewMatrix.Rotate(worldOrient[1], 0, 1, 0);

		// set up picking
		if(isPicking && (pickQueryResult != PICK_ERROR))
			projectionMatrix.PushMatrix();
				// set the projection matrix so that it's just looking at a (in this case) 10x10 pixel area
				// near the cursor. This method (shown above)
				setPickMatrix(mouseX,viewport[3]-mouseY,10,10,viewport);

				// for each item that you want to test, bracket it with a glBeginQuery()/glEndQuery()
				// You'll need a unique pickQueryID for each model
				glBeginQuery(GL_ANY_SAMPLES_PASSED, pickQueryID);

					// render your model associated with pickQueryID here. It is assumed that
					// the projection matrix and the model matrix will be handled by your shader(s)

				// finish the query for this particular model
				glEndQuery(GL_ANY_SAMPLES_PASSED);

			projectionMatrix.PopMatrix();

			// For each item that you queried above, see if at least one pixel was drawn
			// Again, you'll need a unique pickQueryID for each model
			glGetQueryObjectiv(pickQueryID, GL_QUERY_RESULT, &result);
			if(result)
				printf("hitn");
			else
				printf("missn");

			isPicking = false;
		}
	modelViewMatrix.PopMatrix();
}