projection

Projection on a plane using a 2*3 matrix

Hello, I can easily draw the projection of a 3D set of points onto the plane with normal vector (1,1,1), by using the matrix (-sqrt(3)/2 sqrt(3)/2 0) (-1/2 -1/2 1). I want to do the same thing, but for a projection onto an arbitrary plane with normal vector (a,b,c) instead of (1,1,1). How to find the matrix...

Linq to Sql Projection Help

I've reached the end of my Linq rope. Need your help! Heres my table structure first(all linq to sql objects): InventoryItems -ID -AmtInStock IventoryKits -ID InventoryKits_to_InventoryItems -InventoryItemID -InventoryKitID So i need to do a projection like the following var q2=from k in GetAllKits()//returns IQueryable...

Mercator Projection and scaling

http://wiki.openstreetmap.org/wiki/Mercator With the C# example in the above link, I am able to project lat/lon to x/y co-ordinates. However, I'm having problem with scaling. I wonder how much length (in miles?) each pixel have after projection. I would like to scale the map before rendering as 500 pixels per mile or something like that...

Subsonic 3 LINQ Projection issue, fixed or no?

I'm currently experiencing the issue mentioned here (and several other places): http://stackoverflow.com/questions/1105052/subsonic-3-linq-projection-issue This is occurring using the 3.0.0.4 release package, and it also occurs when I grab the latest from GitHub and build it. I am using the LINQ Templates. I have this code: v...

Full object projection with additional values in LINQ

Is it possible to project every property of an object and add more, without specifically listing them all. For instance, instead of doing this: var projection = from e in context.entities select new QuestionnaireVersionExtended { Id = e.Id, Versio...

How do you put raw-sql projections in an object using Hibernate?

Let's say I have a query that begins with the following projections: SELECT t.term as term, count(g.id) as amount This is raw sql, and I am using createSqlQuery on the Hibernate session object. What I'd like to do is take these projections and put them in an object that has a "term" and "amount" properties. With HQL, we can use "sel...

Getting Started with Matrix3D (Silverlight)

Okay, I know absolutely nothing about 3D projection, but I need to figure out a way to project pictures in Silverlight (<Matrix3D/>) based on some predetermined variables that I have available to me. I've searched high and low for some sample code or a really basic "for stupidies" set of articles, but have yet to find anything that makes...

Z Value after Perspective Divide is always less than -1.

Hi All, So I'm writing my own custom 3D transformation pipeline in order to gain a better understanding of how it all works. I can get everything rendering to the screen properly and I'm now about to go back and look at clipping. From my understanding, I should be clipping a vertex point if the x or y value after the perspective divid...

Hibernate - setProjection after Criteria after Criteria

why is this not possible? Criteria crit1 = sess.createCriteria(Criteria1Class.class); Criteria crit2 = crit1.createCriteria("criteria2Class"); crit2.setProjection(Projections.groupProperty("criteria2Property")); List<String> l2 = crit2.list(); If I use this construction I get the error: could not resolve property: criteria2Property...

Fisheye projection matrix in Xna/OpenGL - 3D

Hi, I'm looking for a projection matrix I can use in 3D that will give me the effect of a fisheye. I'm not looking for a pixelshader or anything like that, that will manipulate pixels - but the actual projection matrix used in projecting from 3D space onto 2D. Thanks. ...

Perspective projection - how do I project points which are behind 'camera'?

Hi everyone, I'm writing my own software rasterizer in Java, and I ran into some trouble with it... take a look at a sample image, please: Image This sample just draw simple square grid on a plane. Everything works fine until I move camera close enough for some points to move behind it. After that, they're no longer projected correctl...

Doing Eager Loading and Projection in Linq to Entities

This is a spin off from another question I posted a few days ago that was successfully answered but it really didn't get into the underlying issue I was having but wasn't able to express fully in my original query. I have a table Product. Product is related to ProductDescription in a one-to-many relationship. ProductDescription can have...

How to convert/project 4D coordinates to 3D coordinates

Hi, theres a lot of nice looking demonstrations of 4D projection showing tesseracts and other wonderful shapes. I'm trying to make a visualisation of a tesseract and I couldn't find anything explicitly describing the maths involved on google... How (preferably in pseudo code) does one project a point in 4D space into 3D space? thanks i...

Linq to NHibernate projection to anon. type results in mystifying cast error

I have an TaxWork entity which is persisted using NHibernate. This entity has the following properties (among others): public virtual TaxWorkType Type { get; set; } //Kctc.TaxWorkType is an enumeration public virtual TaxWorkStatus Status { get; set; } //Kctc.TaxWorkStatus is an enumeration public virtual LegalWorkPriority Priority { get...

Projecting a 3D point to 2D screen space using a perspective camera matrix

Hi everyone, I am attempting to project a series of 3D points onto the screen using a perspective camera matrix. I do not have world space (or consider it being an identity matrix) and my camera does not have camera space (or consider it an identity matrix), I do have a 4x4 matrix for my object space. I am taking the object matrix and ...

If a world matrix and camera matrix are both identity matrices, can they be ommited?

This is a basic question about the need for world and camera space matrices when each are identity matrices. Can they be ommited when calculating a 2D projection? I'm pretty sure that they can, although I seem to be getting strange results when I try to project some 3D points whilst ommiting them, I ask since this might be directly linke...

"sphere in a bag" plane to sphere projection

Hi! I'm looking for the mathematical transformation to transform points on a 2D plane [0,1]x[0,1] onto the unitsphere. The most common projection would latitude-longitude mapping by interpreting u and v as the angles for the spherical coordinates (map u to [0,2PI] and v to [-PI/2, PI/2]) This gives strong distortions on the poles of t...

QR Codes - Camera Orientation/Projection

I am looking for a library or method to decode a QR Code (or potentially another form of 2d barcode) and to be able to actually determine the camera position and orientation. This seems like it should be doable, but I am not entirely sure. Does anyone know what the best route for this is? Or if it is even possible? ...

Simplest way to perform grouping/projection using Linq To Objects

I'm getting data from the data layer that I need to transform in the middle tier using Linq To Objects (I don't control that tier of the application). I have to perform a grouping operation using multiple keys followed by a string concatenation on the non key-fields. Given the data below, I want to group by CustomerID and Date, and cre...

OpenGl box fullscreen

I'd like to draw the inside of a box fullscreen (i.e. it should completely fill the viewport) using OpenGL. The box should have perspective. I presume I'll have to change the dimensions of the box depending on the viewport size but I'm not sure how to go about this. I'm trying to achieve something like the room in this image My questi...