Cov txheej txheem:
- Kauj ruam 1: Rub tawm Cov Haujlwm
- Kauj ruam 2: Export Koj Tus Qauv rau XML
- Kauj ruam 3: Ntshuam Lub Hom Phiaj rau Java
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:31
Yog tias koj yog Java programmer koj yuav xav tau qhov program hauv 3D ntawm qee kis. Tab sis li cas? Zoo koj tuaj yeem siv Java3D thiab maj mam ntaus hauv txhua kis hauv 3D polygon (sim nws ntseeg kuv nws lub tswv yim tsis zoo), lossis koj tuaj yeem siv Blender (https://blender.org) pub dawb thiab qhib qhov 3D qauv qauv nrog ib tsab ntawv hu ua Blend2Java (https://sourceforge.net/projects/blend2java/). Txawm li cas los xij cov ntaub ntawv ntawm Blend2Java yuav luag tsis muaj yog li ntawd yog vim li cas kuv thiaj nyob ntawm no sau qhov no.
Kauj ruam 1: Rub tawm Cov Haujlwm
Koj yuav xav tau Blender (https://blender.org) thiab Blend2Java (https://sourceforge.net/projects/blend2java/). Ua li ntawd thaum koj muaj ob qho tib si pib ua los ntawm kev ua qauv yooj yim (lossis tsuas yog siv lub voos xwmfab txheem) hauv Blender.
Kauj ruam 2: Export Koj Tus Qauv rau XML
Thaum koj muaj tus qauv koj xav siv hauv Blender qhib Hloov Kho Hom thiab ntaus "a" qhov tseem ceeb los xaiv txhua lub ntsiab lus. Hauv qab vaj huam sib luag xaiv cov ntawv sau. Qhib ib daim ntawv tshiab hauv cov ntawv sau. Qhib cov ntaub ntawv blend2java.py uas koj rub tawm. Run. Ok koj lub hom phiaj yuav tsum tam sim no nyob hauv. XML qhov twg los xij koj khaws nws (yog tias koj muaj thiab cov lus yuam kev ua shure koj tsuas muaj 1 cov khoom siv rau lub hom phiaj). Hloov lub npe (nws yuav muaj lub npe txawv).
Kauj ruam 3: Ntshuam Lub Hom Phiaj rau Java
Shape3D fred = tsis muaj; sim {XMLDecoder e = tshiab XMLDecoder (tshiab BufferedInputStream (FileInputStream tshiab ("c: /HandShape3D.xml"))); // koj cov ntaub ntawv npe no fred = (Shape3D) e.readObject (); e.close (); } ntes (Tsuas yog e) {e.printStackTrace (); } ColoringAttributes ntawm = tshiab ColoringAttributes (); Tshwm sim ap = Tshwm sim tshiab (); Color3f col = tshiab Color3f (1.0f, 0.0f, 1.0f); ColoringAttributes ca = tshiab ColoringAttributes (col, ColoringAttributes. NICEST); ap.setColoringAttributes (ca); fred.setAppearance (ap); obj.addChild (fred); ntxig qhov no rau hauv 3d code lossis siv tag nrho cov cai ntawm no ntshuam java.io.*; ntshuam java.beans. XMLDecoder; ntshuam java.applet. Applet; ntshuam java.awt.*; ntshuam java. awt.event.*; ntshuam com.sun.j3d.utils.applet. MainFrame; ntshuam com.sun.j3d.utils.universe.*; ntshuam javax.media.j3d.*; ntshuam javax.vecmath.*; ntshuam java.applet. Applet; ntshuam java.awt. BorderLayout; ntshuam java.awt. Frame; ntshuam com.sun.j3d.utils.applet. MainFrame; ntshuam com.sun.j3d.utils.geometry. ColorCube; ntshuam com.sun. j3d.utils.universe.*; ntshuam com.sun.j3d.utils.behaviors.mouse.*; ntshuam javax.media.j3d.*; ntshuam javax.vecmath.*; ntshuam java.awt.event.*; ntshuam java.util. Enumeration; pej xeem chav MouseBehaviorApp txuas Applet {pej xeem BranchGroup createSceneGraph () {BranchGroup objRoot = BranchGroup tshiab (); TransformGroup objTransform = tshiab TransformGroup (); objTransform.setCapability (TransformGroup. ALLOW_TRANSFORM_WRITE); objTransform.setCapability (TransformGroup. ALLOW_TRANSFORM_READ); objRoot.addChild (objTransform); Shape3D fred = tsis muaj; sim {XMLDecoder e = tshiab XMLDecoder (BufferedInputStream tshiab (FileInputStream tshiab ("c: /HandShape3D.xml"))); fred = (Shape3D) e.readObject (); e.close (); } ntes (Tsuas yog e) {e.printStackTrace (); } ColoringAttributes ntawm = tshiab ColoringAttributes (); Tshwm sim ap = Tshwm sim tshiab (); Color3f col = tshiab Color3f (1.0f, 0.0f, 1.0f); ColoringAttributes ca = tshiab ColoringAttributes (col, ColoringAttributes. NICEST); ap.setColoringAttributes (ca); fred.setAppearance (ap); objTransform.addChild (fred); MouseRotate myMouseRotate = tshiab MouseRotate (); myMouseRotate.setTransformGroup (objTransform); myMouseRotate.setSchedulingBounds (BoundingSphere tshiab ()); objRoot.addChild (myMouseRotate); MouseTranslate myMouseTranslate = tshiab MouseTranslate (); myMouseTranslate.setTransformGroup (objTransform); myMouseTranslate.setSchedulingBounds (BoundingSphere tshiab ()); objRoot.addChild (myMouseTranslate); MouseZoom myMouseZoom = tshiab MouseZoom (); myMouseZoom.setTransformGroup (objTransform); myMouseZoom.setSchedulingBounds (BoundingSphere tshiab ()); objRoot.addChild (myMouseZoom); objRoot.compile (); rov objRoot; } pej xeem MouseBehaviorApp () {setLayout (tshiab BorderLayout ()); Canvas3D canvas3D = Canvas3D tshiab (SimpleUniverse.getPreferredConfiguration ()); ntxiv ("Center", canvas3D); BranchGroup scene = createSceneGraph (); SimpleUniverse simpleU = tshiab SimpleUniverse (canvas3D); simpleU.getViewingPlatform (). setNominalViewingTransform (); simpleU.addBranchGraph (scene); } pej xeem zoo li qub tsis muaj dab tsi tseem ceeb (Txoj hlua args) {Ncej ncej = tshiab MainFrame (tshiab MouseBehaviorApp (), 256, 256); }} siv qhov no rau kev ua tiav programtada! koj ua tiav! thiab tom qab ntawd koj hais tias "tam sim no yog dab tsi?" Kuv tsis muaj lub tswv yim! Kuv nyuam qhuav kawm Java ib hlis dhau los lol!
Pom zoo:
10 Circuit Tsim Cov Lus Qhia Txhua tus tsim qauv yuav tsum paub: 12 kauj ruam
10 Lub Tswv Yim Tsim Kev Tsim Vaj Tsev Txhua Tus Tsim Qauv Yuav tsum Paub: Kev tsim Circuit Court tuaj yeem ua rau txaus ntshai vim tias yam hauv kev muaj tiag yuav txawv ntawm qhov peb nyeem hauv phau ntawv. Nws pom tseeb tias yog tias koj yuav tsum ua tau zoo ntawm kev tsim hluav taws xob koj yuav tsum nkag siab txhua yam khoom thiab xyaum ua ntau yam
Siv Photogrammetry los Tsim Qauv: 9 Kauj Ruam
Siv Photogrammetry los Tsim Qauv: Kuv yog leej twg? Kuv yog Samuel Conklin thiab kuv yog tus kawm qib kaum ntawm E.L. Meyers High School. Kuv tau sim nrog photogrammetry rau ob peb lub hlis dhau los thiab kuv vam tias yuav pab koj yog tias koj xaiv rov tsim cov khoom no. Kuv txaus siab pom yuav ua li cas lwm tus pe
Tsim Daim Npav Khaub Ncaws Nrog Cov Qauv Tsim Kev Xav: 7 Kauj Ruam
Tsim Daim Npav Khaub Ncaws Nrog Cov Qauv Tsim Txoj Kev Xav: Nyob Zoo, Lub khob ntawv los khob uas tau tsim los raws li txoj kev xav, ntawm no. Ua tibzoo saib qhov no thiab thov tawm lus. Kuv yuav txhim kho kuv qhov project nrog koj cov lus :) Ua tsaug ntau ---------------------------- Merhaba, Tsim kev xav rau kuv
Yuav Tsim Tus Qauv Li Cas thiab Tsim PCB Siv Autodesk EAGLE: 9 Kauj Ruam
Yuav Ua Li Cas Tsim Kev Tsim Vaj Tsev thiab Tsim PCB Siv Autodesk EAGLE: Muaj ntau yam CAD (Khoos Phis Tawj Pab Tsim) software tawm uas tuaj yeem pab koj tsim thiab ua PCBs (Luam Circuit Board), qhov teeb meem tsuas yog feem ntau ntawm lawv tsis t piav qhia yuav siv lawv li cas thiab lawv tuaj yeem ua dab tsi. Kuv tau siv ntau t
FoldTronics: Tsim 3D Lub Hom Phiaj Nrog Cov Khoom Siv Hluav Taws Xob Siv Foldable HoneyComb Cov Qauv: 11 Cov Kauj Ruam
FoldTronics: Tsim 3D Lub Hom Phiaj Nrog Cov Khoom Siv Hluav Taws Xob Siv Foldable HoneyComb Cov Qauv: Hauv qhov kev qhia no, peb nthuav tawm FoldTronics, 2D-txiav raws li txheej txheem kev tsim khoom los ua ke cov khoom siv hluav taws xob rau hauv cov khoom 3D. Lub tswv yim tseem ceeb yog txhawm rau txiav thiab nthuav tawm daim ntawv 2D siv lub tshuab txiav txiav los ua kom nws tig tau mus rau hauv 3D honeycomb struc