manusia

No 7-14 Semua (balik urutan) |

manusia@manusia : 2009-10-07 14:43:22 UTC+0000
diacu: >>8
...ga ada yg bener nih ah jawabannya.
masalahnya dah tau di double precision sih dari awal.
cm ga tau solusinya.
casting ke int  = solusi pertama, tp gagal kalo range Bu ama bv sangat random, ex: 1e-30,etc.
solusi kedua ga tau. nunggu ide.
solusi ketiga, jgn pake c++, pake matlab. sayangnya req pake c++.

int _tmain(int argc, _TCHAR* argv[])
{
double Bux = 1.444, Buy =2.3232, Buz =3.23232;
double bvx = -1.543, bvy = -2.5343, bvz = -3.5343;
double Bvx,Bvy,Bvz;
if((Bux*bvx+Buy*bvy+Buz*bvz)==0)
{
Bvx = bvx; Bvy = bvy; Bvz = bvz;
}
else
{
double k = -1 * (Bux*bvx+Buy*bvy+Buz*bvz) / (pow(Bux,2)+pow(Buy,2)+pow(Buz,2));
Bvx = (k*Bux)+bvx;
Bvy = (k*Buy)+bvy;
Bvz = (k*Buz)+bvz;
double dot_product = Bux*Bvx+Buy*Bvy+Buz*Bvz;

//kenapa dot_product harus nol
//dot_product = Bux * ((k*Bux)+bvx) + Buy*((k*Buy)+bvx)+ Buz*((k*Buz)+bvz)
//                = k (Bux^2+Buy^2+Buz^2) + (Bux*bvx+Buy*bvy+Buz*bvz)
//masukin k = -1 * (Bux*bvx+Buy*bvy+Buz*bvz) / (pow(Bux,2)+pow(Buy,2)+pow(Buz,2))
//                = 0

double g =3;
}
return 0;
}
andreas_en_@manusia : 2009-10-07 15:07:41 UTC+0000
diacu: >>9
>>7
bagaimana kalo mu cast ke int setelah itung dot productnya? bolehkah seperti itu?
manusia@manusia : 2009-10-07 16:17:30 UTC+0000
diacu: >>10
>>8
sayangnya, yg diinginkan adalah nilai (double) Bu dan Bv di mana Bu (dot) Bv = 0.
dot_product cuma buat confirm hasil. jd ga ada guna cast int ke dot_product.
makasih dah kasih ide, walau idenya dah kepikir jg.
andreas@manusia : 2009-10-07 16:47:28 UTC+0000
diacu: >>11
>>9
OOOOOOOOOOOOOOOOOOOOO, adu baru sadar, kok bodoh amat ga ngarti maksudmu aslinya apaan.

baiklah akan kubantu pikir lagi, tanya: ini pr kah? ato mu iseng2 aja? :D
manusia@manusia : 2009-10-07 17:08:55 UTC+0000
>>10
anggeplah pr kecil dari pr yg amat besar :D
manusia@manusia : 2009-10-23 10:22:01 UTC+0000
diacu: >>13
karena ga ada yg jawab2 jg. Mari mulai pertanyaan baru

How to subdivide regular pentagon into smaller regular pentagons?
We know it's a trivial matter to subdivide equilateral triangle into 3 smaller equilateral triangles. It's just a matter of finding an intersection of edges formed by connecting half or center points of one edges to the opposite points.
Any kind help is appreciated.
Rin@manusia : 2009-10-23 10:47:21 UTC+0000
>>12
Will that method produce *3* *equilateral* triangles?
manusia@manusia : 2009-10-23 15:42:11 UTC+0000
Wah hebat, bisa notice salahnya di sana.
Hasilnya pake method itu cm akan jd kongruen.

jd, mari diulang:
How to subdivide regular pentagon into smaller regular pentagons?
We know it's a trivial matter to subdivide equilateral triangle into '4' smaller equilateral triangles.
It's just a matter of forming edges between each center pts of all the edges.

Aplikasi dari subdivision of triangles: buat subdivide icosahedron
void subdivide(float *v1, float *v2, float *v3)
{
GLfloat v12[3], v23[3], v31[3];
GLint i;
for (i = 0; i < 3; i++) {
v12[i] = v1[i]+v2[i];
v23[i] = v2[i]+v3[i];
v31[i] = v3[i]+v1[i];
}
normalize(v12);
normalize(v23);
normalize(v31);
drawtriangle(v1, v12, v31);
drawtriangle(v2, v23, v12);
drawtriangle(v3, v31, v23);
drawtriangle(v12, v23, v31);
}

Point pertanyaan: cari cara termudah buat subdivide dodecahedron tanpa dissamble pentagons jadi triangles.

 

Kau akan ngepos secara anonim! Boleh2 aja sih, bahkan tulis nama dan sembarang paswod pun boleh. Tapi kalo mau daftar, klik daftar

Nama Pwd gp jsp (tiga tiga)+(nam satu)= +img +coret

 

|

|

|

|

|

|

|

|

|

|

|

|

|

|

|

|

|

|

|

|

|

|

|

|

|

|

|

|