how can I represent 4 dimensional data in 3 dimensions(RGB) or 2 dimensions(XY grid) [closed] - dimensions

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I want to represent 4 dimensional data in RGB colors so that when clustering is done similar nodes have similar colors or by position on an XY grid. how can this be done?

4d? like 3d data with the time dimension?
Anyway, it depends on what technology we're talking about. It sounds like you would need a 3d scatter chart with your fourth dimension being a selection control such as a slider that changes the time. You could use WPF w/ silverlight if you want to display it on a site but I'm sure a variety of technologies can be used to get the same result. You'll need to modify most common solutions to get the similar colors according to position. Statistical algorithms like k-means is usually suited for clustering data together.

Let the four dimensions be w,x,y,z.
There will only be 3 axis:
make x as the no. of degrees it is farther from x axis
similarly, put the value of y as the no. of degrees it is parallel to y axis.
do the same with z.
w represents how far the point is from the origin of the chart.
Alternatively, you may simply use a Radar Chart.

Related

Draw along a path detection in iOS [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I am writing a writing app for Kids.
I need to enforce writing along a define path like in Dora ABC apps. For example, writing A.
When user touch and draw, it draw only when user finger are along the defined path and can detect whether user follow that path or not.
My path are defined in UIBezierpath.
I try to use CGRectContainsPoint but it seem to be too much code when I have so many alphabet.
Any suggestion is much appreciated.
Thanks!
you may try another approach-
Using Custom gestures in ios: Using this feature you can have predefined gestures for alphabets and you can use these gestures for detection. demo code available at https://github.com/britg/MultistrokeGestureRecognizer-iOS
Or if you want to implement it from scratch- http://blog.federicomestrone.com/2012/01/31/creating-custom-gesture-recognisers-for-ios/

Get coordinates of head in Kinect [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
i am making an App in Open GL (C++) with Kinect.
I want to get the coordinates of head (Skeleton).
I saw the function:
void CSkeletalViewerApp::Nui_DrawSkeletonSegment( NUI_SKELETON_DATA * pSkel, int numJoints, ... ) ,
but I dont know how to use it and extract the coordinates of the head.
Judging from the code snipped you posted, we can assume you are using Microsoft's Kinect for Windows SDK.
The coordinates of the joints are stored in the SkeletonPositions member of the NUI_SKELETON_DATA structure. Instances of this structure can be found in the SkeletonData member of the NUI_SKELETON_FRAME structure, which is provided whenever the skeleton tracking engine finishes tracking.
Of course, this will only work, if the sensor is initialized properly. Please have a look at the sample projects that come with the SDK, and read Microsoft's online documentation.
Also, be aware that the Kinect's coordinate system has its origin at the sensor and provides coordinate values ranging roughly from -2.2 to 2.2 on the x-axis, from -1.6 to 1.6 on the y-axis, and from 0.0 to 4.0 on the z-axis (depth). Thus, you might need to apply some transformations.

How do I implement an eraser tool for a drawing/painting app? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I am trying to develop a drawing/painting app for my portfolio.
The functions I have now are "Write", "Change Size", and "Change Color".
Now, I am trying to implement an eraser tool that will totally erase what's written. What I did so far was copy the same code I used for writing, using white as the color, but instead of erasing what's written it just overwrites the first one. Is that the right way, or is there another way to implement this?
I don't honestly know too much about OpenGL as of this writing, but I suspect that painting over with white is the wrong thing to do. Consider what happens if you decide to allow users to change the background color. The your code gets a little more complicated. What if you decide to add support for gradients?
I suggest finding a way to simply clear the data at a given point, for example, where your brush is. You might want to look at an open source graphics program, like GIMP, to see how they do it.

image repository with noise for testing [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I need set of gray scale images with random noise to do some testing.
I have searched and found many images but without noise.
Or maybe some easy way to add a random noise to an image.
For image processing you could use The Gimp which is a great image processing tool (There are another alternatives like Photoshop and Paint Shop Pro).
Also, if you want to add the noise programatically you should state what environment are you working with so we can help you.

how do you test a calculator? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 12 years ago.
How will you test a calculator? Any thoughts?
thanks,
===
Sorry that I did not elaborate this question much at the beginning. Now, I want to give more backgrounds about this. This question was asked during a technical interview for a programmer position. So I suppose they were looking for some really "smart" answers or some good approach to test such application...
Thanks again.
Exercise the interface. Does it do what you expect?
Exercise the functionality. Does it do what you expect?
Exercise boundary conditions. Does it handle division by zero? How does it handle really big and really small values? Are there rounding errors that crop up?
by throwing it against a wall, if it breaks... then it wasn't meant to be.
Besides normal calculations...
Divide by zero.
Make sure negative numbers work
Check if rounding is correct
If you are a calculator manufacturer you will undoubtedly have a database of formulas with known outputs for specific inputs. To test the calculator, give it the known inputs and check that it computes the known outputs.
You then also need to test that each button has the desired effect on the internal stack.
Finally, you will need to test all the non-math functionality -- does the clear button clear the display? Do your undo buttons properly undo? And so forth.
In general, you would want to check for border cases for every possible operation.
For example, for addition, you would check negative additions, additions involving irrational or infinite numbers etc.
For division, you would check for dividing with 0, etc.