surface

Doing readback from Direct3D textures and surfaces

I need to figure out how to get the data from D3D textures and surfaces back to system memory. What's the fastest way to do such things and how? Also if I only need one subrect, how can one read back only that portion without having to read back the entire thing to system memory? In short I'm looking for concise descriptions of how ...

interpolate a terrain surface from scattered data using heat equation

Hi This is my first question in this forum, so please bear with me and I hope I'm not violating any rules. I am looking at different ways to model scattered 3d data as a gridded function (over xy support, z=z(x,y)). Answering another question, coryan was so nice as to mention the method using heat equation to interpolate (approximate) a...

Slicing a NURBS surface

I have a NURBS surface which has 4 curved edges. (I have the 4 bezier points for the curves) I'd like to slice the NURBS surface with a slicing-plane thats on-axis (not as advanced as 3DSMAX!), and calculate a curve where the slicing-plane and NURBS surface intersects. ...

Calculate the horizon of a curved face?

I need to find the 2 points of the visual horizon, of a curved face. I have: XYZ of the 4 corner points XYZ of the 2 curved edge bezier points And I need to calculate either: XY of the horizon points XYZ of the horizon points See the image below. ...

Calculate the horizon of a curved face? - Not extrema

I need to find the 2 points of the visual horizon, of a curved face. I have: XYZ of the 4 corner points XYZ of the 2 curved edge bezier points And I need to calculate either: XY of the 2 horizon points XYZ of the 2 horizon points Note: I got a solution the last time I asked this question, but it only found the extrema of the c...

Generating the function of the plane/surface that a given set of coordinates lie on...

This is something related with Mathematics as well. But this is useful in computing as well. Lets say you have 10 coordinates. (x1,y1)(x2,y2)..... in 2D Space. (i.e on a X-Y Plane). Can we find a single smooth curve going across the each coordinate. While expanding the question, If the space is 3D, then can we find an equation of a sm...

How can 2D text be reflected onto 3D mesh surface ?

Hi All, How can a 2D text be reflected onto 3D mesh surface in C# ? Thanks in advance. Cemo ...

Rendering altitude data into a height map with kriging

Hi, I'm looking for an easy way to render altitude data into a heightmap. It could be a little easier to be archived with other techniques than kriging, like triangulation, but in this case speed doesn't cost and kriging was the most realistic way. Lets say I have the altitude points in an array and I want to call a function that calcu...

Passing D3DFMT_UNKNOWN into IDirect3DDevice9::CreateTexture()

I'm kind of wondering about this, if you create a texture in memory in DirectX with the CreateTexture function: HRESULT CreateTexture( UINT Width, UINT Height, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DTexture9** ppTexture, HANDLE* pSharedHandle ); ...and pass in D3DFMT_UNKNOWN format what is s...

Volume of a 3D closed mesh car object

Dear Sir, I have a 3D closed mesh car object having a surface made up triangles. I want to calculate its volume, center of volume and inertia tensor. Could you help me Regards. George ...

"Normalize" procedure in C#

Could someone explain to me what the normalization procedure for 3D surface mesh in C# is? In a reference book, there is a line as follows : The GetNormalize method is used to map the region of your surface into a region of [-1, 1], which gives you a better view on your screen. ...

How can I clear a SDL_Surface to be replaced with another one?

Been trying to find this online for a while now. I have a SDL_Surface with some content (in one it's text, in another is a part of a sprite). Inside the game loop I get the data onto the screen fine. But then it loops again and it doesn't replace the old data but just writes over it. So in the case of the text, it becomes a mess. I've ...

Is there any way to "clear" a surface?

Just wondering... Is there any way to clear a surface from anything that has been blitted to it? ...

Poisson Disk distribution on hemisphere

Hi! I just implemented Poisson Disk generation in the plane with this simple algorithm: http://people.cs.ubc.ca/~rbridson/docs/bridson-siggraph07-poissondisk.pdf Now I would like to generate a Poisson Disk distribution on the surface of a hemisphere (or better, on a part of the spherical surface, given a certain angle) can anyone tell...

Continuation of 'app not working in Droid' investigation: the code. Can anyone see any obvious error here?

Hello, and thanks for helping. In my previous question I asked if System.currentTimeMillis() was buggy in Droid, and the answer was no. I assume the problem I'm having is somewhere else. While I wait for my Droid lone-user to report if a test app works on his phone, I would like to post some relevant code here. Please keep in mind th...

Surface Normals

Hello All, I have a request about surface normals. At the following code snippet is from the URL : http://www.kindohm.com/technical/wpf3dtutorial.htm private Model3DGroup CreateTriangleModel(Point3D p0, Point3D p1, Point3D p2) { MeshGeometry3D mesh = new MeshGeometry3D(); mesh.Positions.Add(p0); mesh.Positions.Add(p1); ...

C# code snippet calculating the surface and vertex normals

Hello, I need a C# code snippet calculating the surface and vertex normals. Kind of surface is triangulated 3D closed mesh. The required code snippet must be able to use a vertex set and triangleindices. These are ready to use at the moment. The surface of 3D mesh object is not smooth, so it needs to be smoothed. Could you help me. Th...

Browsers supporting event processing in dojox.gfx Surface

Is events processing in dojox.gfx Surface supported by browsers other than Firefox 3? Say, i have a variable named surface that is an instance of a gfx surface, i then listen to click events on it using surface.connect("onclick",null,function(e){ console.debug("clicked on the surface"); }); It works in Firefox 3, but it doesn't...

Intersection Of A Surface An Plane

I'm trying to find out when a quadratic selection algorithm is faster than a linear selection algorithm. Running some experiments I generated two 3D plots that show the algorithm run times as a function of the input array size and the desired order statistic. Using gnuplot to draw the plot I confirmed that there are cases when the quadra...

A drawing canvas/surface that will look same in any environment?

You develop an application on windows. And deploy it on windows machines. You find it looks neat, since the windows gui system renders quite well. If you want the same app to run under linux or unix platforms they look different. Because the UI system they use might be different. Is there any standard to how for e.g. buttons can look or ...