Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #170973

Re: random points near central point

Newsgroups comp.lang.c
Date 2023-07-20 09:31 -0700
References <eb9e82fb-265b-42a7-a245-1943e5b3b5aan@googlegroups.com> <87tttzr9h0.fsf@bsb.me.uk>
Message-ID <a0756188-052d-406b-8fe8-7c6a071be044n@googlegroups.com> (permalink)
Subject Re: random points near central point
From fir <profesor.fir@gmail.com>

Show all headers | View raw


środa, 19 lipca 2023 o 21:24:09 UTC+2 Ben Bacarisse napisał(a):
> fir <profes...@gmail.com> writes: 
> 
> > i need tos et asteroids in game (about 100 or 200) but not in square 
> > area with two rands one for x and second for y but need it to 
> > be sphericel symetric around central point and in more densitu near it 
> > and less desity with bigger radius until some radius when it is zero
> If you just pick a uniform angle and a uniform radius and plot those 
> points, the density of points near the origin will be higher. This is a 
> very simple method and might be suitable for a game.

uniform  radius? dont know what is that

generally i need whole pack of functions to set things arndomly but not just in rectangle whuich
will be given by applaying rand to x and y
this spherical group with decaying density with radius is one of that

> > something like 
> > 
> > SetRandomPointSphericalSymetricAndFadingWithDistance( 
> > float x, float y, float r1, float r2);
> This suggests that I've not understood your opening paragraph, but I 
> offer the solution in case someone else might be interested.
> > this r1 is radius of circle below which density is max and r2 is radius 
> > where above density is zero - in beetweem r1 and r2 density should 
> > be from max (at r1) to zero at r2 
> > 
> > how to do that?
> -- 
> Ben.

Back to comp.lang.c | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

random points near central point fir <profesor.fir@gmail.com> - 2023-07-18 23:38 -0700
  Re: random points near central point Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-07-19 01:49 -0700
    Re: random points near central point fir <profesor.fir@gmail.com> - 2023-07-19 04:20 -0700
  Re: random points near central point Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-07-19 01:59 -0700
  Re: random points near central point Kaz Kylheku <864-117-4973@kylheku.com> - 2023-07-19 16:50 +0000
  Re: random points near central point Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-07-19 20:23 +0100
    Re: random points near central point fir <profesor.fir@gmail.com> - 2023-07-20 09:31 -0700
      Re: random points near central point Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-07-20 20:42 +0100
        Re: random points near central point fir <profesor.fir@gmail.com> - 2023-07-20 12:56 -0700
          Re: random points near central point Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-07-20 20:59 +0100
          Re: random points near central point David Brown <david.brown@hesbynett.no> - 2023-07-21 09:13 +0200
            Re: random points near central point fir <profesor.fir@gmail.com> - 2023-07-21 05:55 -0700
              Re: random points near central point Ed Prochak <edprochak@gmail.com> - 2023-07-22 12:24 -0700
                Re: random points near central point fir <profesor.fir@gmail.com> - 2023-07-23 04:04 -0700
                Re: random points near central point Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-07-23 14:53 +0100
                Re: random points near central point fir <profesor.fir@gmail.com> - 2023-07-23 07:03 -0700
                Re: random points near central point "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-07-23 12:30 -0700
                Re: random points near central point Ed Prochak <edprochak@gmail.com> - 2023-07-30 21:48 -0700
        Re: random points near central point fir <profesor.fir@gmail.com> - 2023-07-20 13:20 -0700
      Re: random points near central point "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-07-20 12:57 -0700
        Re: random points near central point fir <profesor.fir@gmail.com> - 2023-07-20 13:18 -0700
          Re: random points near central point "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-07-23 12:28 -0700
  Re: random points near central point "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-07-20 12:56 -0700

csiph-web