naurril / SUSTechPOINTS

3D Point Cloud Annotation Platform for Autonomous Driving
GNU General Public License v3.0
867 stars 222 forks source link

How to change the distance of the three circles on the main page #140

Closed zheyuanWang closed 1 year ago

zheyuanWang commented 1 year ago

Hi,

their distances were 30, 50, 100 for now. Where can I change their distances or add more circles?

(searched "30" in the source code but didn't find any relevant code)

naurril commented 1 year ago

search 'addRangeCircle'

zheyuanWang commented 1 year ago

thanks for your reply!

I added an extra circle in the function and it works well.


    this.addRangeCircle= function(){
        var h = 1;
        var body = [];
        var red_body = [];
        var segments=72;
        for (var i = -12; i<12; i++){
            var theta1 = (2*Math.PI/segments) * i;
            var x1 = Math.cos(theta1);
            var y1 = Math.sin(theta1);

            var theta2 = 2*Math.PI/segments * ((i+1)%segments);
            var x2 = Math.cos(theta2);
            var y2 = Math.sin(theta2);

            body.push(x1,y1,h,x2,y2,h);
            red_body.push(2.0*x1,2.0*y1,h,2.0*x2,2.0*y2,h);
            body.push(3.0*x1,3.0*y1,h,3.0*x2,3.0*y2,h);
            red_body.push(4.0*x1,4.0*y1,h,4.0*x2,4.0*y2,h);
        }