Subversion Repositories gelsvn

Rev

Rev 646 | Rev 663 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 646 Rev 662
Line 42... Line 42...
42
	Q.Resize(mani.no_vertices(), mani.no_vertices());
42
	Q.Resize(mani.no_vertices(), mani.no_vertices());
43
	
43
	
44
	for(VertexIDIterator v = mani.vertices_begin(); v != mani.vertices_end(); ++v)
44
	for(VertexIDIterator v = mani.vertices_begin(); v != mani.vertices_end(); ++v)
45
		if(!boundary(mani, *v)){
45
		if(!boundary(mani, *v)){
46
			int i = vtouched[*v];
46
			int i = vtouched[*v];
47
			double area_i = voronoi_area(mani, *v);
47
			double area_i = mixed_area(mani, *v);
48
			Vec3d vertex(mani.pos(*v));
48
			Vec3d vertex(mani.pos(*v));
49
			Vec3d curv_normal(0);
49
			Vec3d curv_normal(0);
50
			double a_sum = 0;
50
			double a_sum = 0;
51
            for(Walker wv = mani.walker(*v); !wv.full_circle(); wv = wv.circulate_vertex_cw())
51
            for(Walker wv = mani.walker(*v); !wv.full_circle(); wv = wv.circulate_vertex_cw())
52
			{
52
			{
53
				int j = vtouched[wv.vertex()];
53
				int j = vtouched[wv.vertex()];
54
				double area_j = voronoi_area(mani, wv.vertex());
54
				double area_j = mixed_area(mani, wv.vertex());
55
				
55
				
56
				Vec3d nbr(mani.pos(wv.vertex()));
56
				Vec3d nbr(mani.pos(wv.vertex()));
57
				Vec3d left(mani.pos(wv.next().vertex()));
57
				Vec3d left(mani.pos(wv.next().vertex()));
58
				Vec3d right(mani.pos(wv.opp().prev().opp().vertex()));
58
				Vec3d right(mani.pos(wv.opp().prev().opp().vertex()));
59
				
59
				
Line 120... Line 120...
120
	for(int es=E0;es<=E1;++es)
120
	for(int es=E0;es<=E1;++es)
121
		add_frequency(es, scale);
121
		add_frequency(es, scale);
122
}
122
}
123
 
123
 
124
 
124
 
125
double Harmonics::compute_adf(HMesh::VertexAttributeVector<double>& F, double t)
125
double Harmonics::compute_adf(HMesh::VertexAttributeVector<double>& F, double t, double fiedler_boost)
126
{
126
{
127
	double F_max = 0;
127
	double F_max = 0;
128
	for(VertexID vid : mani.vertices()){
128
	for(VertexID vid : mani.vertices()){
129
		for(int e = 1; e < V.Length(); ++e)
129
		for(int e = 1; e < V.Length(); ++e)
130
			F[vid] += sqr(Q[e][vtouched[vid]]) * exp(-t*V[e]/V[1]);
130
			F[vid] += sqr(Q[e][vtouched[vid]]) * exp(-t*V[e]/V[1]);
-
 
131
            if(fiedler_boost>0)
-
 
132
                for(int e = 1; e < V.Length(); ++e)
-
 
133
                    F[vid] += sqr(Q[e][vtouched[vid]]) * exp(-t) * fiedler_boost;
-
 
134
        
131
		F_max = max(F[vid], F_max);
135
		F_max = max(F[vid], F_max);
132
	}
136
	}
133
    return F_max;
137
    return F_max;
134
}
138
}