java3d相册代码的简单介绍
html5 3d旋转相册代码怎么用
以下是代码:
创新互联建站是专业的伽师网站建设公司,伽师接单;提供成都网站设计、成都做网站、外贸网站建设,网页设计,网站设计,建网站,PHP网站建设等专业做网站服务;采用PHP框架,可快速的进行伽师网站开发网页制作和功能扩展;专业做搜索引擎喜爱的网站,专业的做网站团队,希望更多企业前来合作!
!DOCTYPE html
html
head
titletransform-style实现Div的3D旋转-柯乐义/title
style
*{font-size: 24px;color: #00ff00; padding:0; margin:0;}
#container {
position: relative;
height: 300px;
width: 300px;
-webkit-perspective: 500;
margin-top: 200px;
margin-right: auto;
margin-left: auto;
}
#parent-keleyi-com {
margin: 10px;
width: 280px;
height: 280px;
background-color: #666;
opacity: 0.3;
-webkit-transform-style: preserve-3d;
-webkit-animation: spin 15s infinite linear;
}
#parent-keleyi-com div {
position: absolute;
top: 40px;
left: 40px;
width: 280px;
height: 200px;
padding: 10px;
-webkit-box-sizing: border-box;
}
#parent-keleyi-com :first-child {
background-color: #000;
-webkit-transform: translateZ(-100px) rotateY(45deg);
}
#parent-keleyi-com :last-child {
background-color: #333;
-webkit-transform: translateZ(50px) rotateX(20deg);
-webkit-transform-origin: 50% top;
}
/*执行Y轴旋转360度动画*/
@-webkit-keyframes spin {
from {-webkit-transform: rotateY(0);}
to {-webkit-transform: rotateY(360deg);}
}
/style
/head
body
div请使用支持CSS3的浏览器a href="" target="_blank"原文/a/div
div id="container"
div id="parent-keleyi-com"
diva href="/"柯乐义/a/div
diva href="/"keleyi.com/a/div
/div
/div
/body
/html
现在要用JAVA绘制3D立体图像,请大师指点,谢谢!!
你可以先去【绘学霸】网站找“3d建模”板块的【免费】视频教程-【点击进入】完整入门到精通视频教程列表: ;tagid=307zdhhr-11y04r-175539509341845604
想要系统的学习可以考虑报一个网络直播课,推荐CGWANG的网络课。老师讲得细,上完还可以回看,还有同类型录播课可以免费学(赠送终身VIP)。
自制能力相对较弱的话,建议还是去好点的培训机构,实力和规模在国内排名前几的大机构,推荐行业龙头:王氏教育。
王氏教育全国直营校区面授课程试听【复制后面链接在浏览器也可打开】: ;zdhhr-11y04r-175539509341845604
在“3d建模”领域的培训机构里,【王氏教育】是国内的老大,且没有加盟分校,都是总部直营的连锁校区。跟很多其它同类型大机构不一样的是:王氏教育每个校区都是实体面授,老师是手把手教,而且有专门的班主任从早盯到晚,爆肝式的学习模式,提升会很快,特别适合基础差的学生。
大家可以先把【绘学霸】APP下载到自己手机,方便碎片时间学习——绘学霸APP下载:
谁能给我一个JAVA电子相册或音乐播放器的代码啊 急急急
我自己做过一个类似的电子相册,但功能很不够全面,给你参考下...
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
public class img4 extends Applet
{
static Button btn1,btn2,btn3,btn4,btn5;
public void init()
{
setBackground(Color.cyan);
setVisible(true);
setLayout(null);
img4cvs cvs=new img4cvs();
btn1=new Button("下一页");
btn2=new Button("上一页");
btn4=new Button("自动播放");
btn5=new Button("停止");
add(btn1);
add(btn2);
add(btn4);
add(btn5);
add(cvs);
btn2.setBounds(550,60,60,30);
btn1.setBounds(550,120,60,30);
btn4.setBounds(550,180,60,30);
btn5.setBounds(550,240,60,30);
cvs.setBounds(30,30,500,400);
btn1.addActionListener(cvs);
btn2.addActionListener(cvs);
btn4.addActionListener(cvs);
btn5.addActionListener(cvs);
validate();
}
class Backcolor extends Thread
{
public void run()
{int j=0;int m=0;int n=0;
while(true)
{
try{
if(j255m255n255)
{
j++;
sleep(100);
Color col1=new Color(j,m,n);
setBackground(col1); }
else if(j==255m255)
{
m++;
sleep(100);
Color col2=new Color(j,m,n);
setBackground(col2); }
else if(j==255m==255n255)
{
n++;
sleep(100);
Color col3=new Color(j,m,n);
setBackground(col3);}
else if(j==255m==255n==255)
{
j=55;
m=55;
n=55;
}
}
catch(InterruptedException e){}
}
}
}
public void start()
{
Backcolor thread2=new Backcolor();
thread2.start();
}
}
class img4cvs extends Canvas implements ActionListener
{
Image[] img;
int pg=0;
volatile boolean pleaseStop;
//String FONTS="Serif";
//String TEXT="我们很性感2!!";
img4cvs()
{
img=new Image[12];
Toolkit tl=getToolkit();
for(int i=0;i=11;i++)
{
img[i]=tl.getImage("img0"+i+".JPG");
}
}
class Play extends Thread
{
public void run()
{
while(!pleaseStop)
{
try{
pg++;
if(pg11){pg=0;}
sleep(1500);
}
catch(InterruptedException e){}
repaint();
}
}
}
public void actionPerformed(ActionEvent e)
{
Play thread=new Play();
if(e.getSource()==img4.btn1)
{
pg++;
if(pg11){pg=0;}
repaint();
}
else if(e.getSource()==img4.btn2)
{
pg--;
if(pg0){pg=11;}
repaint();
}
else if(e.getSource()==img4.btn4)
{
pleaseStop=false;
thread.start();
}
else if(e.getSource()==img4.btn5)
{
pleaseStop=true;
}
}
public void paint(Graphics g)
{
/*g.setColor(Color.black);
g.setFont(new Font(FONTS,Font.BOLD+Font.ITALIC,20));
g.drawString(TEXT,0,500);*/
g.drawImage(img[pg],0,0,500,400,this);
}
}
/*
applet code="img4.class" width=650 height=500
/applet
*/
java怎么画出 3D 效果的图像?
可参考 孙博文 的一本书 分形算法与程序设计: Java实现 里面有3D的内容
貌似要下载 JAVA3D 的msi安装包 解压后得到jar包 JAVA 3D已经被淘汰 可能有点难找
用Java3D编程就行了 你先把那书上关于3D的代码 稍微看一下 编程的思路也就是 先建立一个场景(有光) 然后空间描点 画线 着色 之类的 可以参考具体的Java 3D 的书 貌似大多是英文的
编程也可以参考官方API文档
求JAVA电子相册代码
页面:
%@ Page language="c#" Codebehind="filesystem.aspx.cs" AutoEventWireup="false" Inherits="WebShop.filesystem" %
!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
HTML
HEAD
titlefilesystem/title
meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR"
meta content="C#" name="CODE_LANGUAGE"
meta content="JavaScript" name="vs_defaultClientScript"
meta content="" name="vs_targetSchema"
LINK href="CssStyle.css" type="text/css" rel="stylesheet"
form id="Form1" method="post" runat="server"
/HEAD
body MS_POSITIONING="GridLayout"
FONT face="宋体"
table cellSpacing="1" cellPadding="0" width="777" align="center" bgColor="#336600" border="0"
tr
td bgColor="#08498c" colSpan="3"IMG src="images/FileSystemBaner.gif"/td
/tr
tr
td width="170" bgColor="#e3e3e3" rowSpan="2"
asp:linkbutton id="LinkButton1" runat="server"后退/asp:linkbutton/td
td width="604" bgColor="#efefef" colSpan="2"
asp:datalist id="DataList1" runat="server" RepeatColumns="4" RepeatDirection="Horizontal" DataKeyField="Name"
Width="604"
ItemTemplate
table width="150" align="center"
tr
td align="center" width="10"/td
td align="left" width="140"%#DataBinder.Eval(Container.DataItem,"Image")%
/td
/tr
tr
td width="10" align="right"
asp:CheckBox ID="checkBox1" Runat="server" //td
td width="140" align="left"font face="宋体"%#DataBinder.Eval(Container.DataItem,"Name")%/font/td
/tr
/table
/ItemTemplate
/asp:datalist/td
/tr
tr
td align="right" bgColor="#efefef" colSpan="2"asp:button id="Button3" runat="server" Text="删除选中项"/asp:button
input id="fileFeild1" type="file" name="fileFeild1" runat="server"
asp:button id="Button1" runat="server" Text="确定上传"/asp:buttonbr
asp:textbox id="TextBox1" runat="server"/asp:textbox
asp:button id="Button2" runat="server" Text="创建目录"/asp:button/td
/tr
tr
td bgColor="#888888" colSpan="3"span class="STYLE1"asp:label id="Label2" runat="server" ForeColor="White" 当前所在位置:/asp:labelSPAN class="STYLE1"asp:label id="Label1" runat="server" ForeColor="White" Width="87px"/asp:label/SPAN/span/td
/tr
/table
/FONT/FORM
/body
/HTML
后台代码:
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.IO;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
namespace WebShop
{
/// summary
/// filesystem 的摘要说明。
/// /summary
public class filesystem : System.Web.UI.Page
{
protected System.Web.UI.WebControls.LinkButton LinkButton1;
protected System.Web.UI.WebControls.DataList DataList1;
protected System.Web.UI.WebControls.Button Button3;
protected System.Web.UI.WebControls.Button Button1;
protected System.Web.UI.WebControls.TextBox TextBox1;
protected System.Web.UI.WebControls.Button Button2;
protected System.Web.UI.WebControls.Label Label2;
protected System.Web.UI.WebControls.Label Label1;
protected System.Web.UI.HtmlControls.HtmlInputFile fileFeild1;
private void Page_Load(object sender, System.EventArgs e)
{
if(!IsPostBack)
{
Bind();
}
}
private void Bind()
{
string initpath="";
if(Request["path"]==null)
{
initpath=Server.MapPath("FileSystem");
}
else
{
initpath=Request["path"];
}
this.Label1.Text=initpath;
DataTable dt=new DataTable();
DataColumn dc0=new DataColumn("Image",System.Type.GetType("System.String"));
dt.Columns.Add(dc0);
DataColumn dc1=new DataColumn("Name",System.Type.GetType("System.String"));
dt.Columns.Add(dc1);
DirectoryInfo di=new DirectoryInfo(this.Label1.Text);
DirectoryInfo[] dis=di.GetDirectories();
foreach(DirectoryInfo d in dis)
{
DataRow dr=dt.NewRow();
dr[0]="a href='filesystem.aspx?path="+HttpUtility.UrlEncode(d.FullName,System.Text.Encoding.UTF8)+"'img src='images/folder.gif' border=0//a";
dr[1]=d.Name;
dt.Rows.Add(dr);
}
FileInfo[] fis=di.GetFiles();
foreach(FileInfo f in fis)
{
string ex=f.Extension.ToLower();
if(ex==".jpg" || ex==".jpeg" || ex==".gif" || ex==".png" || ex==".bmp")
{
string fullname=f.FullName;
string urlpath=fullname.Substring(fullname.IndexOf("FileSystem"));
string url=HttpUtility.UrlEncode(urlpath,System.Text.Encoding.UTF8);
DataRow dr=dt.NewRow();
dr[0]="a href='"+url+"' target='_blank'img src='"+url+"' border=0 width=100 height=128//a";
dr[1]=f.Name;
dt.Rows.Add(dr);
}
}
this.DataList1.DataSource=dt;
this.DataList1.DataBind();
}
#region Web 窗体设计器生成的代码
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: 该调用是 ASP.NET Web 窗体设计器所必需的。
//
InitializeComponent();
base.OnInit(e);
}
/// summary
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// /summary
private void InitializeComponent()
{
this.LinkButton1.Click += new System.EventHandler(this.LinkButton1_Click);
this.Button3.Click += new System.EventHandler(this.Button3_Click);
this.Button1.Click += new System.EventHandler(this.Button1_Click);
this.Button2.Click += new System.EventHandler(this.Button2_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
private void LinkButton1_Click(object sender, System.EventArgs e)
{
string Parent=Directory.GetParent(this.Label1.Text).ToString();
if(Parent.IndexOf("FileSystem")-1)
{
Response.Redirect("filesystem.aspx?path="+Parent);
}
else
{
return;
}
}
private void Button1_Click(object sender, System.EventArgs e)
{
HttpPostedFile hpf=this.fileFeild1.PostedFile;
string ClientPath=hpf.FileName;
string filename=Path.GetFileName(ClientPath);
string ex=Path.GetExtension(filename);
if(ex==".jpg" || ex==".jpeg" || ex==".gif" || ex==".png" || ex==".bmp")
{
string SavePath=this.Label1.Text+"\\"+filename;
hpf.SaveAs(SavePath);
Bind();
}
else
{
Response.Write(Tools.GetAlertJS("所上传的图片格式不正确!"));
return;
}
}
private void Button2_Click(object sender, System.EventArgs e)
{
string filename=this.TextBox1.Text;
Directory.CreateDirectory(this.Label1.Text+"\\"+filename);
Bind();
}
private void Button3_Click(object sender, System.EventArgs e)
{
for(int i=0;ithis.DataList1.Items.Count;i++)
{
if(((CheckBox)this.DataList1.Items[i].FindControl("CheckBox1")).Checked)
{
int index=this.DataList1.Items[i].ItemIndex;
string filePath=this.Label1.Text+"\\"+this.DataList1.DataKeys[index].ToString();
if(Directory.Exists(filePath))
{
Directory.Delete(filePath,true);
}
if(File.Exists(filePath))
{
File.Delete(filePath);
}
Bind();
}
}
}
}
}
这个是C#的 你改下 Java的就行
分享文章:java3d相册代码的简单介绍
网页地址:http://ybzwz.com/article/docgppp.html