Find Jobs
Hire Freelancers

Computing the point between two segments (3D)

$10-30 USD

Cancelado
Publicado há mais de 9 anos

$10-30 USD

Pago na entrega
I need someone for a very small job, I have to find the point resulting of two segments crossing in a 3D space. I found several method on the net and tried this one: D3DXVECTOR3 AB=B-A; D3DXVECTOR3 CD=D-C; D3DXVec3Normalize(&AB,&AB); D3DXVec3Normalize(&CD,&CD); if (D3DXVec3Dot(&AB,&CD)<0.01f) continue; float dx,dy,dz,c,d; dx=fabs(AB.x)+fabs(CD.x); dy=fabs(AB.y)+fabs(CD.y); dz=fabs(AB.z)+fabs(CD.z); if (dx>dz && dy>dz) //plan dx/dy { c=(AB.y*A.x+AB.x*C.y-AB.x*A.y-AB.y*C.x)/(AB.y*CD.x-AB.x*CD.y); d=(CD.y*C.x+CD.x*A.y-CD.x*C.y-CD.y*A.x)/(CD.y*AB.x-CD.x*AB.y); } else if (dx>dy && dz>dy) //plan dx/dz { c=(AB.z*A.x+AB.x*C.z-AB.x*A.z-AB.z*C.x)/(AB.z*CD.x-AB.x*CD.z); d=(CD.z*C.x+CD.x*A.z-CD.x*C.z-CD.z*A.x)/(CD.z*AB.x-CD.x*AB.z); } else if (dy>dx && dz>dx) //plan dy/dz { c=(AB.z*A.y+AB.y*C.z-AB.y*A.z-AB.z*C.y)/(AB.z*CD.y-AB.y*CD.z); d=(CD.z*C.y+CD.y*A.z-CD.y*C.z-CD.z*A.y)/(CD.z*AB.y-CD.y*AB.z); } //CX[nCX++] = ; V0=A+AB*c; V1=C+CD*d; V=V0-V1; if (D3DXVec3Length(&V)>PRECISION) continue; CX[nCX++]=V1; And it work but with a bad precision, with segments of 10 units long I have to set the PRECISION variable to 1 and the point is visualy not one the segments, just near. Then what I need is another method to find that point knowing segments are sometimes not perfectly on the same plane (but almost). I need the job done quickly (within 24hours max)
ID do Projeto: 6758379

Sobre o projeto

3 propostas
Projeto remoto
Ativo há 9 anos

Quer ganhar algum dinheiro?

Benefícios de ofertar no Freelancer

Defina seu orçamento e seu prazo
Seja pago pelo seu trabalho
Descreva sua proposta
É grátis para se inscrever e fazer ofertas em trabalhos
3 freelancers estão ofertando em média $52 USD for esse trabalho
Avatar do Usuário
Hi! I am professional C/C++/C#/Java program,mer. I can do this project with highest quality. Best Regards, Szymszteinsl
$50 USD em 1 dia
4,9 (65 avaliações)
6,7
6,7
Avatar do Usuário
Hello Sir... I have a very good experience in algorithms, geometry and math. Please contact me for details ASAP. Looking forward to work for you Sir. Best Regards.
$35 USD em 1 dia
4,9 (83 avaliações)
6,3
6,3
Avatar do Usuário
Combination of programming and science. Sounds fun. I think I have an idea how to best solve this. Already worked something out.
$70 USD em 1 dia
0,0 (0 avaliações)
0,0
0,0

Sobre o cliente

Bandeira do(a) FRANCE
Bourg de peage, France
5,0
52
Método de pagamento verificado
Membro desde dez. 23, 2003

Verificação do Cliente

Obrigado! Te enviamos um link por e-mail para que você possa reivindicar seu crédito gratuito.
Algo deu errado ao enviar seu e-mail. Por favor, tente novamente.
Usuários Registrados Total de Trabalhos Publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Carregando pré-visualização
Permissão concedida para Geolocalização.
Sua sessão expirou e você foi desconectado. Por favor, faça login novamente.