Temporary Forum Oddities
#86
Is there any way to have code forum posts preserve all ASCII characters in the 32 to 255 range? For example, often times in my code I'll comment depictions of formulas as ASCII art in my code. I usually embed extended ASCII characters in them for readability. The code box below shows the result of this, versus the picture I included showing what it actually looks like.

Code: (Select All)
SUB Rotate (vec AS Type_Vector2, angleDeg AS SINGLE, origin AS Type_Vector2)
    ' Rotate a point around an origin using linear transformations.
    '
    '                                                       Rotating from (x,y) to (x',y')          |
    ' |                    (x',y')                            : L = R cosé                          | All of this shows how to get to this
    ' |                      ù                              : A = x'                              |                          -----------
    ' |                      /.\                              : B = L cosè = R cosè cosé = x cosé    |                                |
    ' |                    / .è\                            : (note - * opposite angles are equal) |                                |
    ' |                    /  .  \                            : C = R siné                          |                          +----+
    ' |                  /  .  \                          : D = C sinè = R sinè siné = y siné    |                          |
    ' |                  /    .    \                          : Y = R sinè                          |                          |
    ' |                /    .    \C                        : X = r cosè                          |                          
    ' |                /      .      \                                    __                          |                  -----------------
    ' |              /      .      \  L stops            : x' = B - |AB| = X cosé - Y siné      |                          
    ' |              /        .        \  here
    ' |            /        .        \  |                All of this just to show how to get from x to x' using      (X cosé - Y siné)
    ' |            /          .          \  |                Use the same linear transformation methods to get y' using  (X siné + Y cosé)
    ' |          R/          .          \ |
    ' |          /            .¿    D      \                Change the origin point of all rotations to (0,0) by subtracting the current
    ' |        /            .------------âù_--ù (x,y)      origin point from the current vector length. Add it back when rotation is
    ' |        /              .        __--.  .            completed.
    ' |      /              . *  __--    .  .
    ' |      /                . __--        .  .
    ' |    /            L __--            .  .
    ' |    /            __--  .            .  .Y
    ' |  /        __--    * .            .  .
    ' |  /      __--          .            .  .
    ' | / é __--              .            .  .
    ' |/__-- è              â.            .  .
    ' ù-----------------------ù-------------ù---ù------------
    '                        A            B
    ' |------------------- X -------------------|
    DIM x AS SINGLE
    DIM y AS SINGLE
    DIM __cos AS SINGLE
    DIM __sin AS SINGLE
    DIM xPrime AS SINGLE
    DIM yPrime AS SINGLE
    x = vec.x - origin.x '                move rotation vector origin to 0
    y = vec.y - origin.y
    __cos = COS(_D2R(angleDeg)) '        get cosine and sine of angle
    __sin = SIN(_D2R(angleDeg))
    xPrime = (x * __cos) - (y * __sin) '  calculate rotated location of vector
    yPrime = (x * __sin) + (y * __cos)
    xPrime = xPrime + origin.x '          move back to original origin
    yPrime = yPrime + origin.y
    vec.x = xPrime '                      pass back rotated vector
    vec.y = yPrime
END SUB


Attached Files Image(s)
   
Software and cathedrals are much the same — first we build them, then we pray.
QB64 Tutorial
Reply


Messages In This Thread
Temporary Forum Oddities - by admin - 06-04-2023, 05:04 AM
RE: Temporary Forum Oddities - by grymmjack - 06-04-2023, 05:21 AM
RE: Temporary Forum Oddities - by TerryRitchie - 06-04-2023, 02:19 PM
RE: Temporary Forum Oddities - by bplus - 06-04-2023, 03:23 PM
RE: Temporary Forum Oddities - by bplus - 06-04-2023, 03:56 PM
RE: Temporary Forum Oddities - by bplus - 06-04-2023, 04:05 PM
RE: Temporary Forum Oddities - by grymmjack - 06-04-2023, 04:31 PM
RE: Temporary Forum Oddities - by SMcNeill - 06-04-2023, 05:15 PM
RE: Temporary Forum Oddities - by bplus - 06-04-2023, 09:55 PM
RE: Temporary Forum Oddities - by bplus - 06-04-2023, 10:27 PM
RE: Temporary Forum Oddities - by grymmjack - 06-05-2023, 12:22 AM
RE: Temporary Forum Oddities - by bplus - 06-05-2023, 04:48 PM
RE: Temporary Forum Oddities - by mnrvovrfc - 06-05-2023, 08:28 PM
RE: Temporary Forum Oddities - by bplus - 06-05-2023, 09:06 PM
RE: Temporary Forum Oddities - by mnrvovrfc - 06-06-2023, 12:00 AM
RE: Temporary Forum Oddities - by SMcNeill - 06-06-2023, 12:10 AM
RE: Temporary Forum Oddities - by SMcNeill - 06-05-2023, 09:10 PM
RE: Temporary Forum Oddities - by grymmjack - 06-06-2023, 12:03 AM
RE: Temporary Forum Oddities - by TerryRitchie - 06-06-2023, 02:07 AM
RE: Temporary Forum Oddities - by grymmjack - 06-06-2023, 12:59 PM
RE: Temporary Forum Oddities - by bplus - 06-06-2023, 12:44 AM
RE: Temporary Forum Oddities - by SMcNeill - 06-06-2023, 05:07 PM
RE: Temporary Forum Oddities - by grymmjack - 06-08-2023, 10:08 PM
RE: Temporary Forum Oddities - by grymmjack - 06-08-2023, 10:06 PM
RE: Temporary Forum Oddities - by bplus - 06-09-2023, 01:11 PM
RE: Temporary Forum Oddities - by SMcNeill - 06-09-2023, 01:40 PM
RE: Temporary Forum Oddities - by bplus - 06-09-2023, 04:33 PM
RE: Temporary Forum Oddities - by TerryRitchie - 06-09-2023, 05:01 PM
RE: Temporary Forum Oddities - by TerryRitchie - 06-10-2023, 06:39 PM
RE: Temporary Forum Oddities - by SMcNeill - 06-10-2023, 06:49 PM
RE: Temporary Forum Oddities - by TerryRitchie - 06-10-2023, 07:02 PM
RE: Temporary Forum Oddities - by SMcNeill - 06-10-2023, 06:57 PM
RE: Temporary Forum Oddities - by SMcNeill - 06-10-2023, 07:14 PM
RE: Temporary Forum Oddities - by grymmjack - 06-10-2023, 07:43 PM
RE: Temporary Forum Oddities - by grymmjack - 06-10-2023, 08:23 PM
RE: Temporary Forum Oddities - by grymmjack - 06-10-2023, 08:25 PM
RE: Temporary Forum Oddities - by grymmjack - 06-10-2023, 08:26 PM
RE: Temporary Forum Oddities - by SMcNeill - 06-10-2023, 08:45 PM
RE: Temporary Forum Oddities - by bplus - 06-10-2023, 09:22 PM
RE: Temporary Forum Oddities - by SMcNeill - 06-10-2023, 09:30 PM
RE: Temporary Forum Oddities - by bplus - 06-10-2023, 09:32 PM
RE: Temporary Forum Oddities - by bplus - 06-10-2023, 09:53 PM
RE: Temporary Forum Oddities - by mnrvovrfc - 06-10-2023, 10:29 PM
RE: Temporary Forum Oddities - by Kernelpanic - 06-11-2023, 11:36 AM
RE: Temporary Forum Oddities - by SMcNeill - 06-11-2023, 11:41 AM
RE: Temporary Forum Oddities - by mnrvovrfc - 06-11-2023, 04:54 PM
RE: Temporary Forum Oddities - by grymmjack - 06-17-2023, 01:46 PM
RE: Temporary Forum Oddities - by mnrvovrfc - 06-23-2023, 01:03 AM
RE: Temporary Forum Oddities - by grymmjack - 06-11-2023, 02:40 PM
RE: Temporary Forum Oddities - by grymmjack - 06-11-2023, 02:51 PM
RE: Temporary Forum Oddities - by bplus - 06-11-2023, 03:11 PM
RE: Temporary Forum Oddities - by grymmjack - 06-11-2023, 03:29 PM
RE: Temporary Forum Oddities - by grymmjack - 06-11-2023, 03:26 PM
RE: Temporary Forum Oddities - by bplus - 06-11-2023, 03:26 PM
RE: Temporary Forum Oddities - by grymmjack - 06-11-2023, 03:49 PM
RE: Temporary Forum Oddities - by bplus - 06-11-2023, 03:40 PM
RE: Temporary Forum Oddities - by bplus - 06-11-2023, 04:40 PM
RE: Temporary Forum Oddities - by Kernelpanic - 06-11-2023, 04:57 PM
RE: Temporary Forum Oddities - by grymmjack - 06-12-2023, 12:35 AM
RE: Temporary Forum Oddities - by grymmjack - 06-13-2023, 12:24 PM
RE: Temporary Forum Oddities - by SMcNeill - 06-13-2023, 01:09 PM
RE: Temporary Forum Oddities - by bplus - 06-13-2023, 03:33 PM
RE: Temporary Forum Oddities - by Kernelpanic - 06-13-2023, 08:04 PM
RE: Temporary Forum Oddities - by SMcNeill - 06-13-2023, 10:03 PM
RE: Temporary Forum Oddities - by grymmjack - 06-17-2023, 01:54 PM
RE: Temporary Forum Oddities - by TerryRitchie - 06-22-2023, 01:05 PM
RE: Temporary Forum Oddities - by bplus - 06-22-2023, 02:12 PM
RE: Temporary Forum Oddities - by TerryRitchie - 06-22-2023, 03:23 PM
RE: Temporary Forum Oddities - by RhoSigma - 06-22-2023, 02:37 PM
RE: Temporary Forum Oddities - by bplus - 06-22-2023, 03:18 PM
RE: Temporary Forum Oddities - by TerryRitchie - 06-22-2023, 03:25 PM
RE: Temporary Forum Oddities - by RhoSigma - 06-22-2023, 04:05 PM
RE: Temporary Forum Oddities - by TerryRitchie - 06-22-2023, 03:37 PM
RE: Temporary Forum Oddities - by bplus - 06-22-2023, 03:39 PM
RE: Temporary Forum Oddities - by TerryRitchie - 06-22-2023, 03:41 PM
RE: Temporary Forum Oddities - by RhoSigma - 06-22-2023, 05:01 PM
RE: Temporary Forum Oddities - by TerryRitchie - 06-22-2023, 11:39 PM
RE: Temporary Forum Oddities - by RhoSigma - 06-23-2023, 06:55 AM
RE: Temporary Forum Oddities - by TerryRitchie - 06-23-2023, 01:41 PM
RE: Temporary Forum Oddities - by RhoSigma - 06-23-2023, 04:13 PM
RE: Temporary Forum Oddities - by bplus - 06-22-2023, 03:44 PM
RE: Temporary Forum Oddities - by TerryRitchie - 06-22-2023, 03:49 PM
RE: Temporary Forum Oddities - by bplus - 06-22-2023, 05:40 PM
RE: Temporary Forum Oddities - by grymmjack - 06-24-2023, 02:53 PM
RE: Temporary Forum Oddities - by bplus - 06-24-2023, 03:17 PM
RE: Temporary Forum Oddities - by RhoSigma - 06-24-2023, 07:34 PM
RE: Temporary Forum Oddities - by bplus - 06-24-2023, 09:29 PM
RE: Temporary Forum Oddities - by RhoSigma - 06-24-2023, 10:02 PM
RE: Temporary Forum Oddities - by TerryRitchie - 06-24-2023, 04:45 PM
RE: Temporary Forum Oddities - by RhoSigma - 06-24-2023, 07:32 PM
RE: Temporary Forum Oddities - by bplus - 06-25-2023, 01:29 AM
RE: Temporary Forum Oddities - by RhoSigma - 06-25-2023, 07:35 AM
RE: Temporary Forum Oddities - by mnrvovrfc - 06-25-2023, 02:42 AM
RE: Temporary Forum Oddities - by RhoSigma - 06-25-2023, 07:44 AM



Users browsing this thread: 27 Guest(s)