text:
Draw an asterisk triangle
Inspired by a task for Programming 101, here's a challenge that hopefully isn't too easy (or a duplicate).
Input:

A positive integer n >= 1.

Output:

n lines of asterisks, where every new line has one asterisk more than the line before, and starting with one asterisk in the first line.

Test case (n=5):
    *
    **
    ***
    ****
    *****

This is code-golf, so shortest answer in bytes wins.

Not duplicate, just subset of Generate a right triangle.

Training spaces allowed on each line?

Is a trailing new line acceptable?

Is a leading newline allowed?

I don't see a reason why not.

For the new challenge, I recommend posting in the sandbox first. I find it very useful for my challenges, even if they seem finished already.

In the comments you said that a leading new line is allow, but the spec now requires one asterisk in the first line. Which is it?

Riley: You can do both, as you please; trichoplax: Thanks, already saw the sandbox :-); Dennis: thanks fr the info!

Is a preceding new line acceptable?

This has already been asked: yes, it is.

Vim, 8 bytes
o <Esc><C-V>{r*J

Takes input in the readahead buffer, so if input is 15, you would type that and then the code above. This is a silly rule, but seems to be allowed. If you got input in a register like "a, you'd just stick @a in front (10). If you got it from the start file, you'd prepend D@" instead (11).
Relies on abuse of :set autoindent, which is default in vimgolf.com rules and default in Vim 8 (and everyone uses it anyway).

o <Esc>: With its number argument, if your text starts with whitespace, and you have :set autoindent, Vim glitches out and creates a cascade of indent.
<C-V>{r*: Turn all those spaces into *s. I'm using block visual so that, even if your lousy indent settings silently group your spaces into tabs, you'll still get the right number of *s.
J: Starting with o unfortunately left a blank line at the top. This removes it.

This answer is insanely impressive. One of the coolest vim answers I've seen.

It looks like a fish. Or a rocket.

I twitched a little bit and fired Vim with -u NONE to see this by myself... It didn't work, it seems autoindent is on in the default vimrc, not vim 8 itself so I had to turn it in manually. But, hats off for the ingenuity of this answer! But why is there only one space per new line? Why does it only work with spaces but not with other characters? I still have much to learn it seems :)

Starting with O <Esc> won't require J at the end.

@primo That leaves an extra blank line at the end, instead of the beginning.

@udioica a single trailing newline is generally considered acceptable.

You might be able to remove the J and cut it down to 7 bytes. OP seemingly allowed a leading newline in the comments of the question.

JavaScript (ES6), 31 bytes
This one includes both a leading and a trailing line-break.
We start with a string s containing only a line-break. Then we process n recursive calls, adding an asterisk on the left side of this string at each iteration. The concatenation of all intermediate strings leads to the expected result.
f=(n,s=`
`)=>n?s+f(n-1,'*'+s):s

Try it online!
Without asterisk, 36 bytes
f=(n,s=`
`)=>n?s+f(n-1,atob`Kg`+s):s

Try it online!

How does it work ?

@Alexis_A - I've added a short description.

Nice recursive answer; I never would have thought of the technique you use with s. You can make it slightly less cryptic with n?s+f(n-1,'*'+s):s.

05AB1E, 7 6 bytes
Uses CP-1252 encoding.
'*×.p»

8 byte no-asterisk version:
žQTè×.p»

Try it online!
Explanation
Example using input n = 5
'*      # push "*"
        # STACK: "*"
  ×     # repeat input number times
        # STACK: "*****"
   .p   # get prefixes of string
        # STACK: ['*', '**', '***', '****', '*****']
     »  # join by newlines
        # implicit print

@TheBitByte 10žQSè×.p» is a logical extension of this answer to get what you wanted for the bounty and it is only 10 bytes. Give Emigna the bounty if nobody beats 10 bytes haha.

@carusocomputing: TžQè×.p» is 8 bytes even.

Still trying to learn the language, missed the T instruction; thought it was odd that there was a ton of Base2 pushes but no base 10. I have to still scour the entire contents of the info.txt to be able to do anything in that language heh.

@carusocomputing some commands are really easy to miss, especially if you know another way to do it :)

So strings are automatically vectorized as lists if you push a list command as well? Is that why S wasn't needeD?

@carusocomputing: Not sure what you are referring to. The only list command I'm using here is » and that is a command specifically for merging a lists with delimiters into a string (and S would ruin that). But a lot of 05AB1E commands do vectorize, yes.

@Emigna you can use this for your no-asterick version, for 7 bytes: 42ç×.p»

@Okx: The no-asterisk version was for a bounty and 42 was specifically disallowed for that, which is why I'm using žQTè instead. Otherwise that would certainly have been a better version :)

@Emigna Oh, I didn't realise, it seems the bounty has been edited out.

@Okx: It was actually never a part of the question, only as a bounty, so there is no way (that I know of) to actually see it anymore which make all the "no-asterisk" versions a bit confusing.

5 bytes: '*×ƶ» (dunno if ƶ existed back then)

@Mr.Xcoder: ƶ is much newer than this challenge, yeah.

@Mr.Xcoder '*×η» too, .p has a 1-byte now as well ;).

Another 5-byter, but this one should also have been possible at the date your answer was posted in the legacy version: L'*×» / L'**»

PowerShell, 21 20 bytes
1.."$args"|%{'*'*$_}

Try it online!
Loops from 1 to input $args, each iteration using string multiplication to construct a string of that many $_ asterisks. Default behavior for the implicit Write-Output at the end is with a newline for separator, so we get that for free.
PS C:\Tools\Scripts\golfing> .\draw-asterisk-pattern.ps1 5
*
**
***
****
*****

PS C:\Tools\Scripts\golfing> .\draw-asterisk-pattern.ps1 2
*
**

PS C:\Tools\Scripts\golfing> .\draw-asterisk-pattern.ps1 7
*
**
***
****
*****
******
*******

-1 byte thanks to Veskah.

Save a byte

Jelly, 6 5 bytes
”*ẋþY

TryItOnline
How?
”*ẋþY - Main link: n
”*    - literal string "*"
   þ  - form outer product with the dyadic function:
  ẋ   -     repeat list (right input is an implicit range(n), Jelly defaults to 1-based)
            so the outer product is like:
            [[i*'*' for i in range(1,len("*")+1)] for x in range(1,n+1)]
    Y - join with line feeds
      - implicit print

Bounty:
I'm not sure what the no ordinals clause is, since a character is a lookup of an ordinal.
Direct lookup would just be 42Ọẋþ³Y for 7 bytes - where the ³ gets us the input)
A short slightly indirect method would be, for 8 bytes, “)’Ọẋþ³Y - where we lookup ')' in jelly's code page, which is 1-indexed so “)’ yields 42.

something interesting happens when you use a leading 0 in the input, eg. try "0414141" as an input. I'm clueless at golf languages so I wouldn't know where to begin trying to explain it.

I think it is evaluated as a string and hence iterates across across it as a string is an iterable and then each character evaluates to an integer as they are all digits (it will error with "hi" for example)

Python 2, 37 34 bytes
i=1;exec"print'*'*i;i+=1;"*input()

Ideone
i is initialised to 1;
then exec commands to execute the following string of code, so it must be constructed;
the string is "print'*'*i;i+=1;" but the * following the string takes precedence over the exec and instructs to first repeat the string input() times;
the exec command now executes the long string which acts like a loop, printing another string of increasing length, again using * to repeat the character '*', then incrementing i with i+=1.
Python 3, 41 bytes:
def f(n):i=1;exec("print('*'*i);i+=1;"*n); or
lambda n,i=1:exec("print('*'*i);i+=1;"*n)

C#, 42 bytes
f=n=>n<1?"":f(n-1)+"\n"+new string('*',n);

Full program with test case:
using System;

namespace DrawAnAsteriskPattern
{
    class Program
    {
        static void Main(string[] args)
        {
            Func<int,string>f= null;
            f=n=>n<1?"":f(n-1)+"\n"+new string('*',n);

            Console.WriteLine(f(5));
        }
    }
}

You need it since it's a recursive function.

right. Didn't see that

GNU sed, 25 24 20 + 1(n flag) = 21 bytes
Edit: 4 bytes less based on Riley's comments
x;G;:;P;s:\n.:*\n:;t

Try it online!
Run example: the input is in unary format, which for sed is allowed based on this consensus
me@LCARS:/PPCG$ sed -nf draw_triangle.sed <<< "0000"

*
**
***
****

A leading newline is present in the output, but this is allowed by the OP.
Explanation:
x;G             # prepend a newline to unary string
:               # start loop
   P            # print first line only
   s:\n.:*\n:   # shift one unary char from 2nd line to 1st, converted to a '*'
t               # repeat

If you Print before the substitution and a leading newline is allowed you don't need /0$/. If a newline isn't allowed you can still save a byte with x;G;:;/*/P;s:\n.:*\n:;t. I asked about a leading newline, but haven't heard back yet.

Pyth, 6 bytes
j._*"*

Try it here.
Explanation
j            Join by newlines
 ._          all prefixes of
    *        the result of repeating
      "*     the string "*"
             as many times as the implicit input

My first Pyth answer

Matlab, 26 23 bytes
Good old Matlab...
@(n)tril(repmat('*',n))

Has trailing whitespaces. tril gives you the lower triangular matrix.
edit: saved 2 bythes thanks to Luis Mendo

You are right - thanks - still not very competitive :P

C++ - 92 96 Bytes
#include<string>
int main(){int n;std::string s;scanf("%d",&n);for(;n--;)puts((s+="*").data());}

Try it online
Ungolfed:
//this one hurts, but c++ strings are mutable
#include<string>
int main(){
    int n;
    //this one hurts as well
    std::string s;
    //read input to n
    //longer than 'std::cin>>n', but no #include<iostream> needed
    scanf("%d",&n);
    // same as 'while(n--)', also characterwise, but way cooler
    for(;n--;)
        //add a '*' the string
        //data() does the same as c_str()
        //puts automatically adds an '\n'
        puts((s+="*").data());
}

should be 'int main(){}' for +4 bytes.

true, damn - so non-standard behaviour of gcc/ideone

Jellyfish, 12 11 9 bytes
\P$'*
  i

Try it online!
Explanation
The above program is equivalent to the following functional pseudocode:
\            P      $       i        '*
map_prefixes(print, reshape(input(), '*'))

The $ (reshape) creates a string of N asterisks. \P creates a function which takes a list (or string) and passes each of its prefixes to P (print). Hence, this successively prints strings of 1 to N asterisks.

Haskell, 35 38 bytes
List comprehension thanks to nimi:
f x=unlines[[1..n]>>"*"|n<-[1..x]]

Old version:
f 0=""
f n=f(n-1)++([1..n]>>"*")++"\n"

Alternate version:
g n=([1..n]>>"*")++"\n"
f n=[1..n]>>=g

You can use ([1..n]>>"*") instead of replicate n'*' to save a byte. I also count only 39 bytes.

Nice alternate version! However I think the byte count is still of by one and should be 38. (See e.g. here) The problem might be the newline after f 0="" which is counted as one byte, but shown as two bytes/characters in some text editors.

Thanks! I see now that I was initially adding a trailing newline when I was counting the characters. Wont make that mistake again!

You can switch to a list comprehension: f x=unlines[[1..n]>>"*"|n<-[1..x]].

R, 45 bytes
For loop approach:
for(i in 1:scan())cat(rep("*",i),"\n",sep="")

Brachylog, 12 bytes
yke:"*"rj@w\

Try it online!
This assumes that a trailing new line is acceptable
Explanation
yk                The range [0, …, Input - 1]
  e               Take one element I of that range
   :"*"rj         Juxtapose "*" I times to itself
         @w       Write that string followed by a new line
           \      False: backtrack to another element of the range

No trailing new line, 15 bytes
-:"*"rj:@[f~@nw

Try it online!
This one works by taking all prefixes of "*" × Input.

Pyth, 7 Bytes
VQ*\*hN

Knocked off a byte thanks to @ETHproductions
Try it online
using @PIetu1998's Technique
6, bytes
j*L*\*S

Nice answer! You can replace "*" with \*.

@ETHproductions I never knew about that,  thanks!

You can remove another byte with a map. j*L\*S (incluSive range, multiply each *L by "*" \*, join by newline) Pyth inserts an implicit Q in the end.

jm*\*h is also 6 bytes.

Brain-Flak 75 Bytes
Includes +3 for -A
{(({})[()]<{({}[()]<(((((()()()){}()){})){}{})>)}{}((()()()()()){})>)}{}

Try it online!

Explanation:
{(({})[()]<                                                        >)}
#reduce the top element by one until it is 0 after doing the following
#Push this element back on to act as a counter for the next step.
#(counts down from input to 0 we'll call this counter)

           {({}[()]<                          >)}
           #reduce the top element by one until it is 0 after doing the following
           #(counts down from counter to 0)

                    (((((()()()){}()){})){}{})
                    #push 42 (the ASCII code for *)

                                                 {}
                                                 #pop the counter used to push
                                                 #the right number of *s

                                                   ((()()()()()){})
                                                   #push a 10 (newline)

                                                                      {}
                                                                      #pop the null byte

this includes a null byte in output? I don't think that is allowed...

Nope, I mean a null byte

@DestructibleWatermelon Yeah, I guess it does. Easy fix though. Thanks.

2sable, 24 11 bytes
>G')Ç>çJN×,

Try it online!
And no sign of any asterisks! Golfed from 24 to 11 thanks to @Emigna.
Explanation:
>G')Ç>çJN×,
>            Push input+1
 G           For N in range (1,input+1)
  ')Ç>çJ     Push '*' by getting ascii code for ')' and adding 1
        Nx,  Print '*' repeated N times

A few tips. õVYI doesn't affect your code in any way and can be removed. 1+ is the same as >.  If you create the asterisk in the loop you can also remove UX. Using × instead of the inner loop saves even more bytes. Without changing method you can get this down to 11 bytes or less.

Nice! I'll edit soon

Could you add an explanation?

Wonderful code, congrats on getting the bounty! The community bot seems to have awarded only 25 and not the original 50 I think because I forgot to award the bounty before the deadline, sorry for that.

Don't worry about it. Just glad to reach the 100-rep mark. @TheBitByte

Dyalog APL, 8 bytes
↑'*'⍴⍨¨⍳

↑ matrify the list consisting of
'*' the string "*"
⍴⍨ reshaped by
¨ each of
⍳ the integers 1 through the argument.
TryAPL online!

Looks like 8 bytes to me.

if ⌸ can be a single byte: (,⍕⊢)⌸⍳

@ngn That is very clever! Post it as your own. You may indeed count it as a single byte it you write 7 bytesSBCS.

V, 8 bytes
Àé*hòlÄx

Try it online!

Oh, yes, Àé hòlÄ!

@JonathanAllan Hey, at least it's more readable than Jelly. (To me) ;)

Jelly's code page is, pretty well organised I think. Check out the overhal of the wiki's Atoms page made recently by Lynn.

@JonathanAllan Yeah, I'd believe it. It may not look like it, but V's mnemonics are well organized because of the keys you use to type them in vim. So my solution in vim-key lingo is <M-@><M-i>*h<M-r>l<M-D>x (m stands for meta, which means alt). All of those are pretty good mnemonics for what the command does.

JavaScript (ES6), 34 bytes
f=x=>x?f(x-1)+`
`+'*'.repeat(x):''

Perl 5, 22 20 bytes
say"*"x$_ for 1..pop

Run it with the -E switch to get say.
$ perl -E 'say"*"x$_ for 1..pop' 5
*
**
***
****
*****

Written out as a full program it would look like this:
use strict;
use feature 'say';

# get the argument
my $limit = pop @ARGV;

foreach my $i (1 .. $limit) {
    say "*" x $i;
}

shift and pop implicitly work on @ARGV (the list of arguments) outside of subs
.. is the range operator
say includes a newline
x is an operator to repeat strings and is explained in perlop

Not sure if I need extra bytes for the command line switch.

I believe the -E flag counts as 1 extra byte.

What about taking the number as input instead of parameter? perl -E 'say"*"x$_ for 1..<>' <<< 5

@manatwork yeah that would work. I'm not good at counting though. Not sure if that's allowed.

-E is free (as it replaces -e which would be needed anyway). If you really want to take the number from the command line (why not, even if <> is 1 byte shorter, and allowed), you should use pop instead of shift (2 bytes shorter)! Anyway, welcome on PPCG, happy to see you golfing!

@simbabque, of course is allowed. You can take even implicit input with -n or -p (possibly combined with -a and -F), just that those are counted. So perl -nE 'say"*"x$_ for 1..$_' <<< 5 is also acceptable just unnecessary long.

Perl 6, 23 bytes
{.put for [\~] '*'xx$_}

( If the output is allowed to be a list of "lines" without newlines .put for  can be removed )
Explanation:
# bare block lambda with implicit parameter ｢$_｣
{
  .put            # print with trailing newline
    for           # for every one of the following
      [\~]        # produce using concatenation operator
        '*' xx $_ # list repeat '*' by the input
}

( See documentation for produce if you don't understand what [\~] ... is doing )

Perl, 19 bytes
-4 bytes thanks to @Ton Hospel and his rework of the solution!
eval"s//*/;say;"x<>

Needs free -E (or -M5.010) flag to run. Takes a number from input :
perl -E 'eval"s//*/;say;"x<>' <<< "5"

You can make eval the same length as the for solution (using <> instead of pop) with eval"s//*/;say;"x<>

@TonHospel Ineed, nice! thanks!

J, 11 8 bytes
Saved 3 bytes thanks to miles!
]\@#&'*'

Here is a decomposition:
(]\@#&'*') x
x (]\@#) '*'
]\ (x # '*')

Now, this last one reads as "the prefixes (]\) of the string consisting of x copies of '*'". Observe:
   5 ]\@# '*'
*
**
***
****
*****
   ]\ 5# '*'
*
**
***
****
*****
   ]\ 5 # '*'
*
**
***
****
*****
   ]\@#&'*' 5
*
**
***
****
*****

Test case
   f =: ]\@#&'*'
   f 3
*
**
***
   f 5
*
**
***
****
*****
   f 1
*
   f 2
*
**
   f &. > ;/1+i.10
+-+--+---+----+-----+------+-------+--------+---------+----------+
|*|* |*  |*   |*    |*     |*      |*       |*        |*         |
| |**|** |**  |**   |**    |**     |**      |**       |**        |
| |  |***|*** |***  |***   |***    |***     |***      |***       |
| |  |   |****|**** |****  |****   |****    |****     |****      |
| |  |   |    |*****|***** |*****  |*****   |*****    |*****     |
| |  |   |    |     |******|****** |******  |******   |******    |
| |  |   |    |     |      |*******|******* |*******  |*******   |
| |  |   |    |     |      |       |********|******** |********  |
| |  |   |    |     |      |       |        |*********|********* |
| |  |   |    |     |      |       |        |         |**********|
+-+--+---+----+-----+------+-------+--------+---------+----------+

Older, 11-byte solutions
'*'#~"+1+i.

This is equivalent
'*' #~"0 1 + i.

1 + i. is the range [1, x]. Then, '*' #~"0 applied to this range shapes (element) copies of '*'.
Bonus program:
[:#&'*'\#&1

This is a capped fork #&'*'\ applied to the result of #&1 of the input. #&1 gives an array of x ones, and #&'*'\ shapes '*' to the prefixes of this array.
Test cases
   f1 =: '*'#~"+1+i.
   f2 =: [:#&'*'\#&1
   f1 1
*
   f2 2
*
**
   f1 3
*
**
***
   f2 4
*
**
***
****
   f2 5
*
**
***
****
*****
   f1 5
*
**
***
****
*****
   (f1;f2)3
+---+---+
|*  |*  |
|** |** |
|***|***|
+---+---+
   f1;f2
f1 ; f2
   (f1;f2)5
+-----+-----+
|*    |*    |
|**   |**   |
|***  |***  |
|**** |**** |
|*****|*****|
+-----+-----+
   (f1;f2)10
+----------+----------+
|*         |*         |
|**        |**        |
|***       |***       |
|****      |****      |
|*****     |*****     |
|******    |******    |
|*******   |*******   |
|********  |********  |
|********* |********* |
|**********|**********|
+----------+----------+

You could also get the prefixes of the string of n copies of '*' for 8 bytes using ]\@#&'*'

@miles: and another 9 byte version: '*'"0\@i.

C, 47 46 45 43 bytes
Takes input from the command line
f(n){for(n&&f(n-1);~n;putchar(n--?42:10));}

Basically if n is not 0 recurse on n-1. at the top of the recursion where n is 0 it just prints a newline, the for loop terminates when n is -1 or ~n is zero, otherwise it prints ASCII 42 which is '*'.
Try it on ideone
C++ 58 Bytes + 19 for including iostream is 77
#include<iostream>
int f(int n){for(n&&f(n-1);~n;std::cout<<(n--?"*":"\n"));}

main(c,v)char**v;
{
    f(atoi(v[1]));
}

a.exe 3
*
**
***

To me seems to work with &&: n?f(n-1):0 → n&&f(n-1).

@manatwork Thanks bud.  saving another byte

In ideone the print of 2 triangle show at the end there is one '\n' more: *
**

**

***** I say the case 0 the case end of revursion, print one \n more

@RosLup Yes it's printing a leading and a trailing newline.  I think the OP said that was OK in his comments.

Vim, 22, 18 keystrokes
O <esc>J:h r<cr>lyEZZ<C-v>{@"

Huge credit to @Udioica for coming up with an awesome vim answer that I expanded on. This answer does not contain any asterisks, in hopes of winning the bounty.
Explanation:
Input is typed before the rest of the program. Udioica came up with this awesome trick. Typing <n>O <esc> will create a pyramid of spaces and one empty line, as long as you have :set autoindent enabled. This option comes on by default in vim 8 and neovim, though not older versions of vim. Since this also creates an extra line, we use J to join this line with the next one, which effectively just removes the line below us.
Now at this point, we need to replace all of these spaces with asterisks. If I was not worried about using asterisks in my code, I would just visually select the whole thing <C-v>{ and type r*, which replaces each character of the selection with an asterisk. But I can't do that.
So we open up the help pages to :h r. The interesting thing about this is that in the vim-window, this page is displayed as:
                            r
r{char}         Replace the character under the cursor with {char}.
                ...

With the cursor on the first 'r'. However, the file itself actually contains this text:
                            *r*
r{char}         Replace the character under the cursor with {char}.
                ...

Pretty convenient. So we move over one character with l, and yank the text r* with yE ([y]ank to the [E]nd of this word).
To close this buffer, we use the shortcut to save a file ZZ. Now, we visually select our spaces, and run the yanked text as if we had typed it by doing @". This works because "@" runs the following register as vim-keystrokes, and " is the default register for yanking.

Care to explain how it works?

@corvus_192 I have added a more extensive explanation, as well as golfing some more off.

Shouldn't the size of the data file be added to the byte count?

@aross the size of the help file? No, because this file is installed alongside vim, and is a default feature.

Commodore 64/VIC-20 BASIC (and compatible C= 8-bits), ~77 tokenized BASIC bytes
0 INPUT"NUMBER OF *";A:ON-(A<1)GOTO1:J=1:FORI=1TOA:FORX=1TOJ:PRINT"*";:NEXTX:J=J+1:PRINT:NEXTI
1 :

Technically line 1 isn't required, but I'm mis-using the ON...GOTO command as a conditional GOTO in line zero so I added in the shortest possible line 1 to end it gracefully.
You will need to use Commodore keyword abbreviations to fit line zero on a C64, see the screen shot below (Note that the C128 in 128 mode might have different keyword abbreviations, but then you can enter more characters so you probably won't need it):

Retina, 14 bytes
Byte count assumes ISO 8859-1 encoding.
.+
$**
.
$`$&¶

Try it online!
Explanation
.+
$**

Turn the input N into N asterisks.
.
$`$&¶

Replace each asterisk with everything up to and including that asterisk (this is the $`$&) and a linefeed (this the ¶).

Java 7 11, 88 73 58 bytes
String c(int n){return(n<2?"":c(n-1)+"\n")+"*".repeat(n);}

-15 bytes by converting to Java 11.
Try it online. (NOTE: String#repeat(int) is emulated as repeat(String,int) for the same byte-count, because TIO doesn't contain Java 11 yet.)
Explanation:
String c(int n){          // Recursive method with integer parameter and String return-type
  return(n<2?             //  If `n` is 1:
          ""              //   Start with an empty String
         :                //  Else:
          c(n-1)          //   Start with a recursive call with `n-1`
                +"\n")    //   and a trailing new-line
         +"*".repeat(n);} //  And append `n` amount of '*'

I beat you by 1 byte

@Numberknot 2 bytes, since you can golf it by 1 more. :)

MATL, 9 8 bytes
1 byte saved thanks to @Luis
:"42@Y"c

Try it Online

CJam, 13 11 10 bytes
Thanks to @MartinEnder for removing two bytes, and @Linus for removing one more!
ri{)'**N}%

Try it online!
Explanation
ri            e# Read input as an integer n
  {     }%    e# Run this block for each k in [0 1 ... n-1]
   )          e# Add 1 to the implicitly pushed k
    '*        e# Push asterisk character
      *       e# Repeat the character k+1 times
       N      e# Push newline
              e# Implicitly display

You can use map on number without taking the range to save another byte.

Cubix, 22 bytes
?(.;I:^;/-.@o;(!\>'*oN

Test it online! Outputs a trailing newline.
At first I wasn't sure I could get this to fit on a 2-cube, but in the end it worked out fine:
    ? (
    . ;
I : ^ ; / - . @
o ; ( ! \ > ' *
    o N
    . .

I'll add an explanation when I have time, hopefully later today.

Explanation anytime soon? :P

Pushy, 4 bytes
:42"

Try it online!
This method takes advantages of Pushy's automatic int/char conversion:
        \ Implicit: Input on stack
:       \ Input times do: (this consumes input)
 42     \   Push 42 (char '*')
   "    \   Print whole stack

Because each iteration adds a new * char, this outputs a triangle. For example, with n=4:
*       \   Stack: [42]
**      \   Stack: [42, 42]
***     \   Stack: [42, 42, 42]
****    \   Stack: [42, 42, 42, 42]

LaTeX, 171 bytes
I had to use LaTeX instead of plain TeX for the \typein macro...
Here it is, as golfed as I could:
\documentclass{book}\begin{document}\typein[\n]{}\newcount\i\newcount\a\i=0\loop{\a=0\loop*\advance\a by1\ifnum\i>\a\repeat}

\advance\i by1
\ifnum\n>\i\repeat\enddocument

Explanation:
\documentclass{book}% Book because it is shorter than article ;)
\begin{document}% Mandatory...
\typein[\n]{}% User inputs \n
\newcount\i% Create a line counter
\newcount\a% And an asterisk counter
\i=0% Initializes the line number to zero
\loop{% Line number loop
   \a=0% Sets the number of asterisks to zero
   \loop% Asterisk loop
   *% Prints the asterisk
   \advance \a by 1% Adds one to \a
   \ifnum\i>\a% If the line number is smaller than the number of asterisks
   \repeat% Then repeat
     }% Otherwise prints a new line

\advance\i by 1% And add 1 to the line counter
\ifnum\n>\i% If input number is less than the number of lines then
\repeat% Repeat
\enddocument% And finish LaTeX

R, 33 bytes
cat(strrep("*",1:scan()),sep="
")

Try it online!
I hope it's not a dupe - I was able to find only one other R answer.
Leverages strrep and vectorization to build the vector "*","**",...,"******" and prints with cat using newline as a separator.

Dyalog APL, 8 bytes
'*'/⍤0⍨⍳

Explanation:

'*': Literal character *.

/⍤0⍨: Select each 0-ranked vector (scalar) according to.

/: Select from the right argument according to the left.
⍤0: Apply the preceding function to each scalar in the left and right arguments.
⍨: Apply the preceding function, but with the left and right arguments switched (so we select now from the left argument according to the right).

⍳: Generate integers from 1 to the argument (inclusive)

05AB1E, 7 5 bytes
L'*×»

Try it online!

Good job, you got quite close to the currently winning 05AB1E answer.

Rockstar, 47 bytes
listen to N
X's0
while N-X
let X be+1
say "*"*X

Try it here (Code will need to be pasted in)

obligatory song

I'd be more partial to this one, @Razetime.

Regenerate, 3 bytes
\*+

You need to pass the input using -l flag.
Example run:
wasif@wasif:~/Downloads/Regenerate$ python3 regenerate.py -l 5 '\*+'
*
**
***
****
*****
wasif@wasif:~/Downloads/Regenerate$

Batch, 69 bytes
@set s=
@for /l %%i in (1,1,%1)do @call set s=*%%s%%&call echo %%s%%

Ruby, 26 bytes
->n{s='';n.times{p s+=?*}}

p will surround each line with double-quotes (because it calls inspect on its arguments). I can't speak for OP, but I suspect this disqualifies your answer.

Brainfuck, 70 bytes
,>++++++[<-------->>>+++++++<<-]<[>+[->+>.<<]>[-<+>]++++++++++.[-]<<-]

I'm sure this could be golfed a little bit. This version only works for single-digit numbers; feel free to modify it to work on larger numbers too.
Edit: If it's allowed to use a single character's ASCII value as the input, the resulting code is below. Only 60 bytes.
,>++++++[>>+++++++<<-]>[>+[->+>.<<]>[-<+>]++++++++++.[-]<<-]

Explanation:
,>++++++[<-------->>>+++++++<<-]  [this gets a single character from
input into the first cell, subtracts 48 to convert it to an integer
representation, and puts 42 in the 3rd cell (ASCII '*').]

<[ while the first cell is not zero do
    >+   add 1 to 2nd cell (empty when we start)
    [->+>.<<]  [while 2nd cell is not empty subtract 1 and print an *.
                Make a copy in 3rd cell.]
    >[-<+>]  copy 3rd cell value back to 2nd cell
    ++++++++++.[-] [put '\n' in 3rd cell, print, clear]
    <<-
 ] loop

Edit: Here is a version that works for numbers up to 255, reading the text representation of the number followed by EOF. If your favorite interpreter has unbounded cells it will work up to 999.
>>,[----------
[
    >++++++[<------>-]<--
>],]

[
 Pointer is one past the end of a run of digits containing input.
 Assumption: input < 256.
 Add ten times most significant digit to second and ten times the
 second to the third to get it in one cell.
]

<<<[>++++++++++<-]>[>++++++++++<-]>

Store 42 '*' in the cell 3 to the right
>>++++++[>+++++++<-]<<

[ While first cell is not empty
    >+ Add 1 to 2nd cell
    [->+>.<<] [make a copy in 3rd cell, print '*']
    >[<+>-] copy 3rd back to 2nd
    ++++++++++.[-] print newline and clear 3rd
    <<- subtract 1 from 1st and continue
]

IIRC you can take a character as input and use its ascii code

Do you mean just use the input character to encode the number of rows in the triangle? Seems like it wouldn't work very well for small triangles since the low numbers are all control codes, not characters.

Yes, but your code would be smaller and I've seen other BF answers using that.

Where can I find the official rules for code golf on this site?

How is it that my Clojure solution is exactly as long as a BrainFuck answer? -_-

Actually, 8 bytes
R`'**`Mi

Try it online!
Explanation:
R`'**`Mi
R         range(1, n+1) ([1, 2, ..., n])
 `'**`M   for each element: that many asterisks
       i  flatten and implicitly print

5 bytes
R'**i

Try it online!

RProgN, 41 Bytes.
24 of these bytes are just assigning R and s, so that we can use a spaceless segment.
'rep' º 'R' = '*' 's' = ►]¿]s\R\1-]}[

Explination
'rep' º 'R' =       # Get the function for 'rep' (Replace), associate 'R' with it.
'*' 's' =           # Associate 's' with the string literal '*'
►                   # Begin spaceless segment.
    ]               # Push a copy of the top of the stack (The input)
    ¿               # While truthy, popping the top of the stack.
        ]           # Push a copy...
        s \ R       # Push an *, swap the two top values giving "i, *, i", Repeat the *, i times, giving "i, ****", or whatever.
        \ 1 -       # Swap the top values, giving "****, i", decrement the top value by 1.
        ]           # Push a copy of the top value.
    }[              # End the while, after processing, pop the top value (Which would be 0). Implcititly print.

Try it!

Sorry, You need to support IFrame. Why don't you..?

Groovy, 27 characters
{1.upto(it){println"*"*it}}

Sample run:
groovy:000> ({1.upto(it){println"*"*it}})(5)
*
**
***
****
*****
===> null

{x->(1..x).each{println"*"*it}} was the one I was about to post before seeing this... 31 vs 27, I always forget about upto and the implicit it closure.

@carusocomputing, yepp, I also usually forget about .upto, but this time IMP1's Ruby answer reminded it.

jq, 19 characters
(18 characters code + 1 character command line option.)
range(1;.+1)|"*"*.

Sample run:
bash-4.3$ jq -r 'range(1;.+1)|"*"*.' <<< 5
*
**
***
****
*****

On-line test (Passing -r through URL is not supported – check Raw Output yourself.)

Charcoal, 5 bytes
Ｇ↓→Ｎ*

It's the same length as Jelly, which is really bad for an ASCII-art oriented language. At least it's readable, I guess
Explanation
Ｇ      Polygon
 ↓→     Down, then right
   Ｎ   Input number
     *  Fill with '*'

Haskell, 32 bytes
unlines.(`take`iterate('*':)"*")

The expression iterate('*':)"*" generates the infinite list ["*","**","***","****","*****",...]. The function then takes the first n elements and joins them with newlines.
The more direct
concat.(`take`iterate('*':)"*\n")

is one byte longer.

RProgN, 42 Bytes, Competing only for the Bounty
Q L c 's' =
►3'rep'º'R'=]¿]s\R\1-]} [

The length of the script is used as the character code for *.

Try it Online!

Not sure if checking program length is borderline abusing the bounty rules or not...

You're gonna need to represent an asterisk one way or another.
The only other way, other than to assign an ordinal through some complex method is to pull it from a constant previously defined in the language, which RProgN lacks.

Okay, I guess I'll get this one pass. Also, grabbing the asterisk from some predefined constant isn't allowed anyways.

Lua, 36 bytes
for i=1,...do print(("*"):rep(i))end

Takes input from the command line.

How exactly you run it? I always get only an error: “lua5.3: IDid.lua:1: 'for' limit must be a number”.

@manatwork You can run it using e.g. lua IDid.lua 5 for 5 lines.

Indeed. Thanks. No idea what I combined earlier. (Was before coffee…)

TI-Basic, 28 22 bytes
Prompt A
"*
For(B,1,A
Disp Ans
Ans+"*
End

Prompt A "* For(B,1,A Disp Ans Ans+"* End for 22 bytes

Wow, I should have thought of that. Thanks @pizzapants184

Perl, 83 76 bytes (no asterisk)
print substr((split("\n",`perldoc perlre`))[55],48,1)x$_."\n"foreach(1..<>);

(Faster version for large input, 83 characters):
$r=`perldoc perlre`;print substr((split("\n",$r))[425],11,1)x$_."\n"foreach(1..<>);

Explanation:
The statement perldoc perlre executes the shell command to display the Perl documentation on regular expressions, which contains an asterisk as the 11th character on line 425.  Split the resulting output by line, then extract that character and print in triangular format.
Edited to save 6 characters by not saving the output of the shell command, and instead just running it every time.  It increases the runtime, though, but we only care about bytes, not runtime :)
Another byte was saved (for a total of -7) by finding an earlier asterisk in the perldoc output.

Very awesome way of doing it, wow.

ForceLang, 146 bytes
def S set
def G goto
S a io.readnum()
S b 0
label 0
if a=b
G 1
if b
io.writeln()
S b 1+b
S c 0
label b
io.write "*"
S c 1+c
if b=c
G 0
G b
label 1

Python 2, 38 37 bytes
There are only 36 characters shown, but a trailing newline is needed to avoid an EOF-related error raised by the interpreter. 1 byte knocked off for Flp.Tkc's observation.
for n in range(input()+1):print'*'*n

Output for n=5
# leading newline here
*
**
***
****
*****

Python 3, 45 bytes
The actual list comprehension is never assigned or printed, but if it were, it would be full of Nones, as None is the default return value of print().

[print('*'*n)for n in range(int(input())+1)]

Why not just use range?

Performance issues for very large triangles. range() in Python 2 returns a list containing all the integers, while xrange() returns a generator.
I suppose for proof of concept range() does fine, but using xrange() when an actual list isn't necessary has become a habit for me.

I know the difference. But this is code-golf :P

Underload, 15 13 bytes
-2 or -3 bytes thanks to @ØrjanJohansen
(
)((*)~*:S)^

Input is a Church numeral inserted between the ) and ^ on the second line. For example:
(
)((*)~*:S)::*:**^

If printing a leading newline is allowed, the following solution works by ommiting the ~, for 12 bytes:
(
)((*)*:S)^

I think you can shorten this by two bytes by putting the newline in the starting string, or three (avoiding a ~) if an initial newline is permitted (the OP never completely clarified that.)

@ØrjanJohansen Thanks, edited.

APL (Dyalog Unicode), 7 bytesSBCS
(,⍕⊢)⌸⍳

Try it online!

W n, 6 4 bytes
'**M

Explanation
   M           % Map every item in the implicit input with...
               % (There's an implicit range from 1)
'**            % asterisks input times

n % Join the result with a (n)ewline

How  do I use the n flag?
... W.py filename.w [input-list] n

GolfScript, 11 bytes
~,{)"*"*n}%

Try it online!
Explanation:
~,                  Create list [0...input-1]
  {      }%         Map over list:
   )"*"*n           Increment, push that many "*"s, push newline

Golfscript has precedent for taking input directly on the stack, no need to use the String input that TIO has. First character can be removed. Try it online!

Flurry, 88 bytes
{}{()[<><<>()>({})]({}{(){}(((<><<>()>){})[{}{<({}){}>}])}{<(<({})(<({}){}>){}>){}>})}{}

Can be run with the interpreter as follows:
$ ./Flurry -bnn -c "$pgm" 5
*
**
***
****
*****

This is heavily based on my answer to "Print a 10 by 10 grid of asterisks". In particular, I'm reusing my derivations of succ, and push_star, and the number 10.
push_star is a function that pushes 42 to the stack and returns its argument unchanged:
push_star := {(){}(((<><<>()>){})[{}{<({}){}>}])}

A function that takes a number n and pushes 42 to the stack n times, then pushes 10, and returns n+1:
push_row = λn. (n push_star (); push 10; succ n)
         = λn. (push (n push_star 10); succ n)
         = λn. K (succ n) (push (n push_star 10))
         = λn. K (succ (push n)) (push (pop push_star 10))
        := {  () [succ (    {})] (      {}  push_star 10)}
        := {  () [succ (    {})] (      {}  push_star {<(<({})(<({}){}>){}>){}>})}
        := {  () [succ (    {})] (      {}  {(){}(((<><<>()>){})[{}{<({}){}>}])}{<(<({})(<({}){}>){}>){}>})}
        := {()[<><<>()>({})]({}{(){}(((<><<>()>){})[{}{<({}){}>}])}{<(<({})(<({}){}>){}>){}>})}

The number 1:
1 = λf n. f n
  = λf. f
 := {  {} }

Pop a number from the stack and apply push_row that many times to 1:
main = pop push_row 1
    := {}{()[<><<>()>({})]({}{(){}(((<><<>()>){})[{}{<({}){}>}])}{<(<({})(<({}){}>){}>){}>})}{{}}

Since popping from an empty stack returns 1, we can replace the final {{}} with {}, yielding:
{}{()[<><<>()>({})]({}{(){}(((<><<>()>){})[{}{<({}){}>}])}{<(<({})(<({}){}>){}>){}>})}{}

tinylisp, 84 bytes
(load library
(d Q(q((A)(join(map string(map* repeat-val(repeat-val 42 A)(1to A)))nl

Try it online!
tinylisp, 89 bytes
(d P(q((A N)(i(s N 1)(i(disp(string A))A(P(c 42 A)(s N 1)))(string A
(d Q(q((N)(P(q(42))N

Try it online!
the length of the library functions makes this surprisingly close to the library based one.

Racket 47 bytes
(for((i(+ 1 n)))(displayln(make-string i #\*)))

Ungolfed:
(define (f n)
  (for ((i (+ 1 n)))                         ; (i 5) in 'for' produces 0,1,2,3,4
    (displayln (make-string i #\*))))        ; #\* means character '*'

Testing:
(f 5)

Output:
*
**
***
****
*****

QBIC, 16 bytes
:#*|[1,a|B=B+A?B

Explanation:
:         Gets a cmd line param as number called 'a'
#*|       Define A$ as '*'
[1,a|     FOR b = 1 to a
B=B+A     Extend B$ with another astrix
?B        Print B$
<FOR LOOP implicitly closed>

QBIC's seen a few updates since this answer was posted. This could now be done with these 12 bytes:
[:|B=B+@*`?B

PHP, 43 34 31 28 bytes
Note: uses IBM 850 encoding (old favorite reinvented recently)
for(;$argn--;)echo$o.=~ı,~§;

Run like this:
echo 5 | php -nR 'for(;$argn--;)echo$o.=~ı,~§;';echo
> *
> **
> ***
> ****
> *****

Explanation
Iterates from N down to 0. Add an asterisk to $o for each iteration, then outputs $o and a newline.
Tweaks

Add an asterisk to $o for each iteration, and then output $o. Saves 9 bytes
Combined adding an asterisk to $o with outputting, saves 3 bytes
Saved 3 bytes by using $argn

@TheBitByte, does my answer qualify for your bounty? It yields an asterisk by binary negation of ı (in IBM-850 encoding, as noted)

Well, as long as it's an actual asterisk, then fine, it does qualify, however it is longer than some other bounty answers here.

Pyke, 6 bytes
Voh\**

Try it here!

Brain-Flak, 81 bytes
78 bytes but three for the -A flag, which enables ASCII output.
{(({}[()])<>()){({}[()]<(((((()()()){}())){}{}){})>)}{}((()()()()()){})<>}<>{}

Try it online!
Brain-flak isn't the greatest language for ASCII-art, but it still managed to be somewhat short. Ish. Kinda.
Explanation:
While True:
{

(
Decrement counter
({}[()])

And move copy to other stack
<>())

Push N '*'s
{({}[()]<(((((()()()){}())){}{}){})>)}

Pop 0
{}

Push newline
((()()()()()){})

Move back to counter
<>

Endwhile
}

Move to other stack
<>

Pop an extra newline
{}

Pyth, 10 8 Bytes
thanks to Jakube for helping me shave off the extra 2 bytes!
VQ*Np"*"

Try it

FNU is the same thing as V. And you don't need that p, printing is implicit.

without the p the code doesn't execute properly. It would print one less level than it should.

Ruby, 27 (or 24) bytes
(Thanks to m-chrzan for pointing out the miscounting.)
Returns a string.
->n{(1..n).map{|i|?**i}*$/}

the map makes an array of strings of * of increasing length. The *$/ takes the array and joins the elements to make a newline-separated string. If an array of strings is acceptable, these three bytes can be saved, scoring 24.
In test program
f=->n{(1..n).map{|i|?**i}*$/}
puts f[5]

I think arrays of strings are acceptable output by default. Also, I believe your current solution is only 27 bytes long, so it'll go down to 24 :D.

Jolf, 7 bytes
This time, the builtin didn't let me win. Oh well.
―t0jj'*

Try it here!
Explanation
―t0jj'*
―t0     pattern: left-corner-base triangle
   j     with <input> height
    j    and <input> width.
     '*  comprised of asterisks

Java 7,72 70 bytes
Thanks to @kevin for shave it off by 2 bytes.
String f(int n,String s,String c){return n<1?c:f(--n,s+"*",c+s+"\n");}

Output
*
**
***
****
*****
******

Nice approach, +1! Btw, you can golf it by 1 more byte by changing c+= to c+.

I see you've removed both s+= and c+=. I tried the same thing, but now your output is incorrect and contains a leading new line. The s+= should remain and c+= can be c+ for the same output without leading empty line. If OP allows leading newlines then it's of course fine like this.

Elixir, 81 bytes
&Enum.reduce(Enum.to_list(1..&1),"",fn(x,r)->r<>String.duplicate("*",x)<>"\n"end)

Anonymous function using the capture operator. Enum.reduce will iterate a list (the list is obtained by calling Enum.to_list on the range 1..n) and concatenate the return string r (which has been initialized with "") with a string made of x asterisks and a newline.
Full program with test case:
s=&Enum.reduce(Enum.to_list(1..&1),"",fn(x,r)->r<>String.duplicate("*",x)<>"\n"end)
IO.write s.(5)

Try it online on ElixirPlayground !

Since the course is taught in C++, I'm eager to see solutions in C++.

C++, 123 bytes
(the joke here is to deliver a 'pure' c++ answer)
#include<string>
class X:public std::string{public:X(int i):std::string(i*(i+1)/2,'*'){for(;i--;)insert(i*(i+1)/2,"\n");}};

Test

C++, 78 bytes
I don't know how there are 2 C++ answers that don't just do it with for loops.  Very short and sweet this way:
void T(int n){for(int i=1;i<=n;i++){for(int j=0;j<i;j++)cout<<'*';cout<<'\n';}}

Full program
#include <iostream>

using namespace std;

void T(int n)
{
    for(int i = 1; i <= n; i++)
    {
        for(int j = 0; j < i; j++)
            cout << '*';
        cout << '\n';
    }
}

int main()
{
  T(5);
}

Edit: it is unclear to me whether to count the #include<iostream>, using namespace std, and/or std::whatever in calls.  C/C++ answers all over this site seem to use both, and for the most part no one seems to care except for the occasional comment.  If I need the std::, then +10.  If I need the #include<iostream>, +18 (although GCC allows me to do without the basic includes, so maybe not that one)

Java, 110 bytes
Not that short, but I really like having empty for loops.
String f(int n){String s="";for(int i=0;i<n;i++,s+=new String(new char[i]).replace("\0","*")+"\n"){}return s;}

GameMaker Language, 68 bytes
a="*"for(i=2;i<=argument0;i++){a+="#"for(j=0;j<i;j++)a+="*"}return a

Prolog, 60 58 56 bytes
g(N):-N<=0,put(*),g(N-1);!.
f(N):-N<=0,f(N-1),g(N),nl;!.

I'm not that familiar with Prolog, but I just gave it a shot.
I'm sure it can be a lot shorter.
Put the code into a file, then load that file into swipl and run f(25). (or some other number).
EDIT: quotes can be left out in put statement
EDIT 2: changing =:= to <= saves 2 bytes. I tried inverting it, but that'd make it wait for a return for some reason.

Brainfuck, 129 bytes
I know there's already a shorter answer in brainfuck, however I wanted to create a program which could handle a multi-digit number input rather than either a single-digit input or a single ascii character input unlike the previous one posted.
,[>+++[->++++[-<<---->>]<]+>,]<-<<[<<]>>[<[->>++++++++++<<]>>>]+>>++++++++++>>++++++[-<+++++++>]<<<<<[>[->+>>.<<<]>>.<[-<+>]<+<-]

This is my first ever brainfuck program and it will work for any input between 0 and the maximum size of a single cell (traditionally 8 bits or 255) entered using the characters '0' to '9' (corresponding to ascii-values 048-057)
Explanation
The first part of this program,  ,[>+++[->++++[-<<---->>]<]+>,], takes the input numbers as char values and removes 48 from each to make them equal to the numbers 0 to 9 rather than the char values of the numbers 0 to 9. It stores these in separate cells with a 1 in between each of them so that the start and end points can be found again.
The second part, <-<<[<<]>>[<[->>++++++++++<<]>>>], consolidates the separate values into one cell. This is why the maximum size of a cell controls how high a number can be.
The third section, +>>++++++++++>>++++++[-<+++++++>]<<<<<, is used to set up the other cells needed: one with the number of asterisks per line, one with the code for a linefeed and one with the code for an asterisk. There is also a blank cell left for working with later.
The remainder of the code, [>[->+>>.<<<]>>.<[-<+>]<+<-], is used to:

Output as many asterisks as necessary
Output a linefeed
Reset the value of the cell controlling the asterisks
Increment the control cell
Decrement the cell with the number until it equals 0

SQL, 153 Bytes
Golfed:
CREATE PROCEDURE P @n INT AS BEGIN DECLARE @a INT;SET @a=0;DECLARE @o VARCHAR(1000);SET @o='*'WHILE @a<@n BEGIN PRINT @o;SET @o=@o+'*'SET @a=@a+1;END;END

Ungolfed:
CREATE PROCEDURE P
@n INT
AS
BEGIN
DECLARE @a INT;
SET @a=0;
DECLARE @o VARCHAR(1000);
SET @o='*'
WHILE @a<@n
    BEGIN
    PRINT @o;
    SET @o=@o+'*'
    SET @a=@a+1;
END;
END

Testing:
EXEC P '6'

Output:
*
**
***
****
*****
******

Wow, that's awesome! :-)

@Sickboy thanks! :) My language of choice is normally C#, but someone beat me to it! :)

just @ is also a legal variable name in SQL, might save a couple of bytes there, and you can set the variable values directly in the DECLARE like so DECLARE @a INT=0 and a lot of those ; are unnecessary

also VARCHAR(MAX) is 1 shorter

Dip, 6 5 bytes
`**En

-1 byte thanks to Oliver
Explanation:
`**    Push "*" repeated input times
   E   Prefixes
    n  Join by newlines

5-byte version: ``**En`

Crystal, 31 bytes
n=5;(1..n).each{|x|puts "*"*x}
Output:
*
**
***
****
*****

Really demonstrates the beauty of Crystal/Ruby. n is the integer input, (1..n) is an inclusive range from 1 to n ([1, n]). .each is a method on Range that runs the provided block for every integer in the range.

python3, 58 57 bytes
print('\n'.join(['*'*(p+1)for p in range(int(input()))]))

Ungolfed:
rownums = int(input())
output = []
for i in range(rownums):
    currrow = "*" * (i+1) # 'i' * 5 == 'iiiii'
    output.append(currrow)
print('\n'.join(output))

C, 88 bytes / 53 bytes
Using C89.
g(a){a&&g(a-1);a<2||puts("");while(a--)putchar('*');}main(int a,char**v){g(atoi(v[1]));}
With whitespace for clarity:
g(a) {
    a && g(a-1);
    a<2 || puts("");
    while (a--) putchar('*');
}
main(int a, char** v) {
    g(atoi(v[1]));
}

Without main, this function is 53 bytes:
g(a){a&&g(a-1);a<2||puts("");while(a--)putchar('*');}

05AB1E, 11 bytes
'*×.pD¦`r`»

Try it online!
Explanation: (Prints hourglass)
                  Implicit input - 5
'*                Asterisk character - stack = '*'
  ×               Repeat input times - stack = '*****'
   .p             Get prefixes       - stack = ['*', '**', '***', '****', '*****']
     D            Duplicate last element
                  STACK = ['*', '**', '***', '****', '*****'] , ['*', '**', '***', '****', '*****']
      ¦           Remove first element from final list
                  STACK = ['*', '**', '***', '****', '*****'] , ['**', '***', '****', '*****']
       `r`        Reverse 1 list and flatten both
                  STACK = '*****','****','***','**','*','**','***','****','*****'
          »       Join by newlines and implicitly print

For input 5, prints:
*****
****
***
**
*
**
***
****
*****

C++ 11, 65 bytes
Not including the include in the byte count.
#include<string>
using S=std::string;S g(int n){return n?g(n-1)+S(n,'*')+'\n':"";}

Usage:
std::cout << g(n) << std::endl;

Common Lisp, SBCL, 69 66 61 45 44 41 bytes
full program:
(dotimes(i(read))(format t"~v{*~}*
"i 1))

Explanation
(dotimes(i(read)) <-- loop from i=0 to i=INPUT-1
(format t"~v{*~}*
"i 1)) <-- loop, displaying i+1 asterisks per line

Ideas for improvement are welcomed.

SmileBASIC, 30 bytes
INPUT N
FOR I=1TO N?"*"*I
NEXT

Haskell 36 Bytes
Here is a version using map.
f="*":map('*':)f;g=unlines.(`take`f)

Input g 10
Output "*\n**\n***\n****\n*****\n******\n*******\n********\n*********\n**********\n"
Alternatives of interest might be:
38 Bytes
g n=id=<<scanl(\x y->'*':x)"*\n"[2..n]

38 Bytes
f="*\n":map('*':)f;g n=id=<<(n`take`f)

36
g n=id=<<(take n$iterate('*':)"*\n")

Anonymous functions are allowed, so you don't need the g=.

k, 18 bytes
{-1@(1+!x)#\:"*";}

Explanation:
-1@ // prints to console

1+!x //returns list from 1 to x (implicit input)

#\:  //for each item in the prefixed list, "take" this many

"*" //asterisk string

@ isn't necessary, and you can use ' instead of : for -2 bytes {-1(1+!x)#'"*";}

Perl 6, 17 bytes
put(\*x++$)xx get

Full program that prints to stdout.
How it works:
    \*             # a Capture object that stringifies to the asterisk,
      x            # string-repeated by
       ++$         # a counter that starts at 1,
put(      )        # and printed followed by a newline.
           xx get  # Do all of that n times.

Invokes the put statement n times, each time printing the asterisk repeated by the counter variable ++$.

Perl 6, 21 bytes
{.put for \*Xx 1..$_}

A lambda that prints to stdout.
How it works:
{                   }  # A lambda.
          \*           # A Capture object that stringifies to the asterisk.
               1..$_   # Range from 1 to n.
            X          # Cartesian product of the two,
             x         # with the string repetition operator applied to each result.
 .put for              # Iterate over the strings, and print each followed by a newline.

Bash + Unix utilities, 26 bytes
seq -f10^%f-1 $1|bc|tr 9 *

Output to stderr should be ignored.
Try it online!
The code above works on TIO since the working directory there has no visible files.  If this needs to run in a directory that contains a visible file, change * to \* at the cost of one byte (27 bytes):
seq -f10^%f-1 $1|bc|tr 9 \*

Japt -R, 8 4 bytes
õ_î*

Try it online!
4-byte alternative:
°Tî*

Try it online

You know, instead of adding a newline to every line, joining with spaces and trimming, you could just join with newlines ;-)

Could you use this 5 byte version?

Terrapin logo, 67 bytes
to a :a
make "b 1 repeat :a[repeat :b[type "*]make "b b+1 pr "]
end

k, 16 12 bytes
4 bytes removed thanks to ngn! :)
{`0:,\x#"*"}

{          } /function(x)
      x#"*"  /reshape "*" by x
    ,\       /scan concatenation through the list
 `0:         /print line by line

(1+!x)#'"*" -> ,\x#"*"

Röda 0.12, 30 29 bytes, non-competing
h i{seq 1,i|{|j|print"*"*j}_}

This is my first try in this scripting language created by fergusq :D
This is a function. To run, use this:
h i{seq 1,i|{|j|print"*"*j}_}

main {
  h(5)
}

Ungolfed
h i{                         /* Define a function h with parameter i */
   seq 1,i                   /* Generate a sequence of numbers from 1 to i */
          |{             }_  /*  and pipe it to a for-loop */
            |j|              /*  where j is the number in the sequence*/
               print"*"*j    /*  and print an asterisk duplicated j times*/
}

The ; after the anonymous function parameter list is not actually required in Röda 0.12. It's a bug in the interpreter, but since you've specified the answer to be 0.12, I think you can remove it. I have been thinking that I may let the bug be, as its a handy feature in code golf, but haven't decided anything yet.

@fergusq Thanks for the tip! "It's not a bug, it's a feature!"

Why is this non-competing?

K, 16 Bytes
 {-1(1+!x)#'"*"};

  {-1(1+!x)#'"*"}10;
*
**
***
****
*****
******
*******
********
*********
**********

EDIT BELOW - adding explanation)
/Code     ---> explanation (pretend x is 3)
1+!x      ---> Numbers from 1 to 3
1 2 3#"*" ---> Take left many items of right ==> ("*";"**";"***")
-1x       ---> Print x to the console, if x is a list, each item is printed to a new line

example(notice the -1 printed at the bottom).
     -1("*";"**";"***")
     *
     **
     ***
     -1
To silence the output(-1), put a semicolon after the expression e.g.
-1("Hello");
Hello

Excel VBA, 32 Bytes
Anonymous VBE immediate window function that takes input from range A1 and outputs to the VBE immediate window.
For i=1To[A1]:?String(i,42):Next

SNOBOL4 (CSNOBOL4), 59 52 bytes
	n =input
o	output =o =o '*' lt(size(o),n) :s(o)
end

Try it online!

Canvas, 3 bytes
*×］

Try it here!
Explanation:
  *×］  full program
｛  ］  map over [1..input]
  *×      repeat by *

MathGolf, 4 bytes
╒⌂*n

Try it online or verify some more test cases.
Explanation:
╒     # Push a list in the range [1, (implicit) input]
 ⌂    # Builtin for the asterisk character "*"
  *   # Map each value to that amount of asterisk characters (similar as in Python)
   n  # And join this list of strings by newlines
      # (after which the entire stack joined together is output implicitly as result)

Wren, 41 bytes
Fn.new{|i|(1..i).map{|n|"*"*n}.join("
")}

Try it online!
Explanation
Fn.new{|i|                             // New function with the parameter i
          (1..i)                       // Generate a range from 1 to i
                .map{|n|"*"*n}         // Replace the numbers with asterisks
                              .join("
")}                                    // Join with newline

C++ (gcc), 61 bytes
int f(int n){for(n&&f(n-1);~n;__builtin_putchar(n--?42:10));}

Uses ASCII char codes and builtins to shorten another solution.
Try it online!

J, 8 bytes
[\@$&'*'

Explanation:

$&'*': Reshape * according to.

$: Reshape.
&: Bound with (partial application).
'*': Character literal *.

@: Function composition.

[\: Each prefix of.

[: Identity.
\: Apply the preceding verb to each prefix of the right argument.

Looks like someone beat me to it.  They used ] instead of [, and # instead of $, but it's conceptually the same thing.

Vyxal j, 3 bytes
×*¦

Try it Online!
How?
×*¦
×*  # Repeat an asterisk the implicit input amount of times
  ¦ # Prefixes
    # j flag joins on newlines

Gema, 36 characters
*=@repeat{*;@append{s;\*}@out{$s\n}}

Sample run:
bash-4.3$ gema '*=@repeat{*;@append{s;\*}@out{$s\n}}' <<< 5
*
**
***
****
*****

Forth, 39 bytes
Quite simple, with a couple of nested loops. ASCII 42 is an asterisk.
: f 0 do I -1 do 42 emit loop CR loop ;

Try it online
Prints a trailing newline.

Bash, 35 characters
for((;i++<$1;));{ s+=\*;echo "$s";}

Sample run:
bash-4.3$ bash draw-an-asterisk-triangle.sh 5
*
**
***
****
*****

C++, 108 chars
#import<iostream>
main(){int n;std::cin>>n;for(int i=1;i<=n;++i){for(int j=i;j--;)std::cout<<"*";puts("");}}

Straightforward.
Try it online

Can the < be moved directly next to the #include? (I don't do C++, just a wild guess based on Java knowledge)

You're right.__

The #include does need to be included in the byte count.

Thanks for the C++ solution, but there's a shorter one ;-)

Vitsy, 19 16 bytes
Yeah this needs some reducing. I'm out of practice!
D1H}\[\['*'O]aO]

(implicit input)
D                 Peek n, push n.
 1                Push 1.
  H               Pop x, pop y, push range(x, y)
   }              Reverse, pop n, reverse, push n.
    \[         ]  Pop n, do bracketed items n times.
      \[    ]     Pop n, do bracketed items n times.
        '*'O      Output the character *.
             aO   Output a newline.

Think of it as though I'm iterating through a list (1 through n) and popping out the number of *s according to the currently selected list item.
Explanation soon.

Is implicit input new for vitsy?

@ConorO'Brien Nope, that's been around since the beginning for numerical inputs through the command line.

Huh. My memory fails me, then.

Javascript, 71 bytes 48 Bytes, thanks ETHproductions!
(n,c)=>{while(c<=n)console.log("*".repeat(c++))}

Welcome to PPCG! You don't need to call the function, just define it: (n,c)=>{while(c<=n){console.log("*".repeat(c++));}} is a valid entry. Also, you don't need the braces in the while loop, nor the semicolon at the end: (n,c)=>{while(c<=n)console.log("*".repeat(c++))}

Befunge93, 31 chars (3 spaces, 8 pure directionals)
&>:#v_@
-^  : >$55+,1
,"*"<_^#:-1

Befunge98, 28 chars
&>:#v_@
-^  : >$a,1
1,*'<_^#:-

This prints the triangle upside down

The enemy's gate is down

Clojure, 59 bytes
#(doseq[m(range 1(inc %))](println(apply str(repeat m\*))))

Basically, just uses doseq to loop over the range, printing the corresponding number of stars.
It's really unfortunate that the shortest way I've been able to repeat a character in Clojure is (apply str (repeat m \*)). That's hardly competitive here. Some good ol' python string multiplication would have been awesome.
Ungolfed:
(defn tri [n]
  (doseq [m (range 1 (inc n))]
    (println (apply str (repeat m \*)))))

Should be fairly self-explanatory.

Ruby, 29 bytes
->n{n.times{|i|puts'*'*i+?*}}

Call with ->n{n.times{|i|puts'*'*i+?*}}[number].

No need for parenthesis around the proc parameter and is shorter to add a literal character than to add 1 to the multiplier ('*'*(i+1) → '*'*i+?*). (BTW, you can call anonymous proc without assigning it to a variable: ->n{n.times{|i|puts'*'*i+?*}}[5].)

Ruby, 32 bytes
1.upto($*[0].to_i){|i|puts"*"*i}

The $* is an array of arguments.
foo.rb 5 will print the following:
*
**
***
****
*****

Unless stated otherwise in the question, the answers should be full programs or functions. In both cases input and output should be handled properly either explicitly by the code itself, or implicitly by the interpreter, if it has such feature. You can not assume your code will find input data in some variable nor to just leave the result in a variable. As it is now, your code is considered a snippet, which is not a valid answer.

ARGV[0]? Sure? Ruby 2.3.1 I use receives command line arguments as String, not Fixnum.

is the output of that okay? It's kinda implicit, but it is returned.

If you ask me, is not valid. Katenkyo suggested in meta to allow such things as he claims Lua programs are able to return string. His suggestion received only 1 upvote and 1 downvote, so there is no consensus on that. In meantime I consider “Programs may output using their exit code... ... if and only if the challenge requires an integer as output, obviously.” relevant with 40 upvotes and 5 downvotes.

"Returning a string from a program" doesn't seem well-defined since it's in no way observable. You can fix your program at the cost of a single byte by using $><<"*"*i instead of "*"*i+$/ though.

@MartinEnder, $><< appends no implicit newline to the output, so with that would need to keep the +$/ part. Better puts.

@manatwork Yeah sorry, should have been puts.

I've gone back to using upto and puts (thankfully still 32 bytes). Is that fine now?

Yepp, fine. (So fine I already borrowed the .upto idea. ;) )

Excel VBA, 109 bytes
This function returns to cell, requires text wrapping be turned on.
Function a(b)
For i = 1 To b
For c = 1 To i
d = "*" & d
Next c
a = a & d & Chr(10)
d = ""
Next i
End Function

99 Bytes - Alternative that runs as a function but prints to immediate.
Function f(b)
For i = 1 To b
For c = 1 To i
Debug.Print "*";
Next c
Debug.Print
Next i
End Function

94 Bytes - One more that is just a sub with hard coded value, prints to immediate.
Sub k()
r = 5
For i = 1 To r
For c = 1 To i
Debug.Print "*";
Next c
Debug.Print
Next i
End Sub

PHP, 66 58 bytes
Just a simple loop, really.
I'm new to golfing, so might not be the shortest way.
for($i=fgets(STDIN);$x++<$i;)echo str_repeat("*",$x)."\n";

https://eval.in/658719
Thanks to manatwork for byte-saving.

No need to explicitly initialize $x, so you can leave that out and move the initialization of $i in its place to spare 1 ; separator. And you can combine the loop's test with the loops stepping: for($i=fgets(STDIN);$x++<$i;)echo str_repeat("*",$x)."␤";

F#, 114 chars
[<EntryPoint>]
let main a =
 for i = 1 to System.Int32.Parse(a.[0]) do
  printfn "%s" <| String.replicate i "*"
 0

Welcome to the site! I don't know anything about F#, but it looks like you might be able to take away some of the whitespace?

Thanks! My first golf, both in my company and on the site. I did try and so far it looks like the other "type" of F# syntax is "verbose", which just gets longer. The indentation is the "light" syntax, which at minimum is a new line char and a space to indent. We do these in our slack channel but i didn't see any F# answers here, so i figured I would post! I can update with test cases but anyone can copy into a new F# console app and run pretty easily with VS 2015 Community and the F# tools, all of which are free.

Scala, 44 30 bytes (51 45 without asterisk, 41 for hourglass)
With asterisk in code (30 bytes):
(i:Int)=>(i to(1,-1))map("*"*) //create a range from i to 1 and map each number to that number of asterisks

Without asterisk (45 bytes):
(i:Int)=>(i to(1,-1))map(((41+1).toChar+"")*) //same as above, but without a literal asterisk

Without asterisk and easy ways of calculating 42 (57 bytes):
(i:Int)=>(i to(1,-1))map(((math sqrt("7G"##)).toChar+"")*)

## is the hashcode method, which returns 1764 for the string "7G", the square root of 1764 is 42, the ascii code for *
Hourglass:
(& :Int)=>((&to(1,-1))++(2 to&))map("*"*)

(& :Int)=>        //define an anonymus function with an int parameter called &
  (
    (& to (1,-1))   //a range from & to 1, counting by -1, aka downwards
    ++              //concat
    (2 to&)         //a range from 2 to &
  )
  map(              //map each number to
    "*" *             //the string "*" repeated x times
  )

@TheBitByte You're right, I didn't notice that I've used asterisks for multiplication / string repitition. I just thought that I could replace '*' with (7*6).toChar and that's it.

The bounty spec is not really precise, it just states "other cheating methods". I have no idea what you consider cheating.

@TheBitByte What do you consider acceptable then? sqrt(1764)? Building a sequence of 42 ones and summing them? Using a string used somewhere in the standard library and extract an asterisk from it?

@TheBitByte It's your bounty, you can make the rules but you should precisely state what you allow and what you consider cheating.

@TheBitByte I know that scala can't win against all those golfing languages

Braingasm, 27 bytes
Braingasm is a brainfuck variant with just a few more instructions and options. And this task would've been so much easier if I had bothered implementing that as many times as the value in the current cell thing yet..
;[->+[->+42.<]10.>[-<+>]<<]

Here's how it works:
;                           Read an integer from stdin and write it to cell#1
 [                        ] While the value of cell#1 is not zero,
  ->+                    <    substract one from cell#1 and add one to cell#2.
     [->+   <]                Each time, do the same between cell#2 and cell#3,
         42.                    but also print an asterix on the way.
              10.             Then print a newline.
                 >[-<+>]<     Move the value from cell#3 back to cell#2

VBA, 84 bytes
taking advantage of recursive coding. it generates x times * as the line/round
Function f(x)
If x<=1 Then f="*" Else f=f(x-1) & vbCrLf & String(x,"*")
End Function

results:
?f(10)
*
**
***
****
*****
******
*******
********
*********
**********
?f(2)
*
**

?f(5)
*
**
***
****
*****

Common Lisp (Lispworks), 71 bytes
(defun f(n)(dotimes(i n)(dotimes(j(1+ i))(format t"*"))(format t"~%")))

Usage:
CL-USER 170 > (f 5)
*
**
***
****
*****
NIL

Ungolfed:
(defun f (n)
  (dotimes (i n)
    (dotimes (j (1+ i))
      (format t "*"))
    (format t "~%")))

MoonScript, 31 bytes
(n)->for i=1,n
 print "*"\rep i

Sample call:
_ 5

Python 3, 196 Bytes
import contextlib as b,io;q=io.StringIO()
with b.redirect_stdout(q):import this
n=int(input());c=q.getvalue()[655];print(''.join([''.join([c for z in range(n)][:i+1])+'\n' for i in range(n)]))

This is probably counted as a cheat, but it uses the asterisk character in the import this string rather than explicitly writing an asterisk in the program code. It also doesn't use any asterisk multiplication operators. It temporarily rerouts stdout so as not to print the Zen of Python when run.

05AB1E, 8 bytes
TžQè×.p»

Explanation coming soon

Isn't this answer (the no asterisk ver.) pretty much the same as yours?

C++, 63 bytes
void s(int n){if(n)s(n-1),cout<<setfill('*')<<setw(n+1)<<"\n";}

Usage:
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
    s(5);
}

Overrides the filling character (which is usually a space), and outputs an empty string (or actually a newline).
One weird thing about this code is the usage of if (...) - I cannot find a way to replace it by a conditional operator ... ? ... : ....

Swift 3, 86 bytes
for i in 1...Int(CommandLine.arguments[1])!{print(String(repeatElement("*",count:i)))}

Yuck.  If I can drop the Int and String initializers I might be able to get this shorter than Java.  Open to any optimizations.
Ungolfed:
import Foundation

guard CommandLine.argc > 1, let a = Int(CommandLine.arguments[1]) else {
    fatalError("Invalid or nonexistent argument")
}

for i in 1...a {
    print(String(repeatElement("*", count: i)))
}

Usage:
➜ ~ swift asterisk.swift 5
*
**
***
****
*****

Element, 16 bytes
_'[1+'[\*`]\
`"]

Try it online!
Explanation:
This is a pretty simple nested-loop approach.  Let N represent the newline in the source code.
_'[1+'[\*`]\N`"]
_'                take input and move it to the control stack
  [            ]  a FOR loop, each iteration = 1 line of output
  [1+          ]  increment the top of the stack, as a counter
  [  '         ]  move that value to the control stack
  [   [   ]    ]  another FOR loop, for the current line
  [   [\*`]    ]  output a literal asterisk
  [        \N` ]  output a literal newline
  [           "]  move the counter from control to main stack

><>, 47 bytes
<v[1:$-1;!?:$+10
0\:&
$>:@=?v1+&:&"*"o
0f]oa~<.

Try it here!
This was fun to write, though a bit more bytes than I expected.

Sinclair ZX81/Timex TS1000/1500, 117 bytes (listing)
1 PRINT "NUMBER OF * TO SHOW?"
2 INPUT A
3 IF A<1 THEN STOP
4 LET J=A/A
5 FOR I=1 TO A
6 FOR X=1 TO J
7 PRINT "*";
8 NEXT X
9 LET J=J+1
10 PRINT
11 NEXT I

Note that because the screen scroll isn't handled in this program listing, you may only enter a number between 0 and 22 because as soon as the ZX81 hits the bottom of the screen it will halt the program. You can see the missing * by using CONT when this happens, but also note that the ZX81 only has 32 columns text by default in BASIC.

To save actual (system) bytes, you may amend the following lines: 3 IF A<CODE "{GRAPHICS ON}{SHIFT}1{SHIFT OFF}{GRAPHICS OFF}" 5 FOR I=PI/PI TO A 6 FOR X=PI/PI TO J 9 LET J=J+PI/PI

SQL, 80 bytes
DECLARE @i INT=1,@ INT=5WHILE @i<>@ BEGIN PRINT REPLICATE('*',@i)SET @i=@i+1 END

ungolfed:
DECLARE @index INT=1,
        @rows INT=5

WHILE @index<>@rows
BEGIN
    PRINT REPLICATE('*',@index)
    SET @index=@index+1
END

Rebol, 32 bytes
loop do input[print append{}"*"]

Ungolfed:
loop do input [
    print append {} "*"
]

AutoHotkey, 28 bytes
Loop,%1%
Send,{* %A_Index%}`n

%1% is the first argument passed in
%A_Index% is the current iteration in the loop
Send sends a keystroke multiple times if it's followed by a number

dc, 33 bytes
?sa0[1+d1F6r^3C*1EF/PAPdla>x]dsxx

Input on stdin, output on stdout.
Try it online!

Forte, 101 bytes
1INPUT0
2LET4=(0*(0+1))*5
4END
6PUT42:LET7=6+1
7LET6=6+10
8PUT10:LET9=((9+9)+14)-3:LET3=8+5
3LET8=9-1

Try it online!
I've been wanting to try Forte for a while, and this seemed like a fine challenge for it. It was quite an effort writing the program, then golfing it and making it fit in one-digit numbered lines. It was also quite fun :) Kudos to ais523 for inventing this and many more incredible languages.
Since I'm in the mood I'll write an explanation in details, covering also the basis of the language.
Explanation
First, a very brief introduction for those who don't know this language, you can find the full specification and guide on its esolang page.
The syntax of Forte is similar BASIC, with line numbers prepended to each line, only that in Forte you dont GOTO 10, you make 10 come to you!
With the command LET, you can assign a number to... another number. If the command LET 10=20 is executed, from now on every time the number 10 is referenced, directly or indirectly (5+5 counts too), it is replaced by 20 instead. This affects line numbers too, so if we were on line 19 when executing that instruction, the next line to be executed will be our old line 10, now line 20.
Now, the actual code (with spaces added for clarity):
1 INPUT 0

This is practically LET 0=, in this program 0 is used like a variable, and only in line number 2
2 LET 4=(0*(0+1))*5
4 END

Line 4 is the one that terminates the program, so we want to put it at the position where we are done printing asterisks. How many of them do we need to print, though? As fitting for a "draw a triangle" challenge, the answer is given by triangular numbers!
The formula to calculate the nth triangular number is n*(n+1)/2. We will print an asterisk every 10 lines, so we multiply it by 10 and get n*(n+1)*5. Use 0 instead of n, add parentheses for every operation (always mandatory in Forte), and you get line 2.
6 PUT 42:LET 7=6+1
7 LET 6=6+10

Here we print the asterisks. The ASCII code for * is 42, so you get what PUT 42 does. The colon separates multiple instructions on the same line, so we then execute LET 7=6+1. What use do we have in redefining 7 as 6+1? Isn't it the same thing? Let's see what happens next.
Line 7 redefines 6 as 6+10, so 16. Ignoring for a moment the rest of the code, this means that when we reach line 16 we will print another asterisk, and then redefine 7 as 6+1. But now 6 is 16, so we are redefining it as 16+1! Line 7 is now line 17 and is the next one to be executed, changing 6 to 6+10, which means changing 16 to 16+10, so on line 26 we will print another asterisk, and so on.
Since in Forte a line cannot change its own number, this is the simplest structure for a loop, two lines changing each other's numbers repeatedly. I know this can be quite confusing, but that's kind of the point of the whole language ;)
8 PUT 10:LET 9=((9+9)+14)-3:LET 3=8+5
3 LET 8=9-1

Ok, that line 3 put here may seem out of place, but in Forte line order doesn't matter, only line numbering. I've chosen to put this line at the end because this pair of lines forms again a cycle, redefining each other's numbers, so it's easier to see them together. Moreover, the first time line 3 is executed (when 3 is still equal to 3 and nothing else), it has no effect on the program, redefining 8 as 8.
As you probably have guessed PUT 10 prints a newline, then the hard part comes. We want each line to have one more asterisk than the one before, so to know where to put the next newline we need to know where the previous one was. To do this, we use another "variable": the number 9. In practice, when we are about to print a newline on line 8, line 3 will be positioned (near) where the previous newline was printed, we'll use it to calculate where the next newline must be printed and move 9 (near) there. (Remember that line 8 can't move itself). Then we move line 3 a bit further than the current position, and use it to move line 8 to our 9.
These three numbers (3,8, and 9) were chosen in order not to conflict with any other redefinition of a number, and to be easy to use together (since neither 5 nor 1 will ever be redefined by this program we can do LET 3=8+5 and LET 8=9-1).
All of these numbers will always be redefined as themselves+10n. This means that 8 will only ever be redefined to numbers ending with an 8 (28,58,98...). This same property is valid for any other number redefinintion in this program (except 0), because this helped greatly my reasoning while writing the code (if you are crazy enough you can try to golf some bytes by using a smaller step, but I doubt there is much room for golfing without completely changing approach).
So, the actual difficult part of this program: LET 9=((9+9)+14)-3. This operation can be better explained if expanded to LET 9=(9+(9-(3-4)))+10, where 4 and 10 represent their respective actual numerical values (in the code they are grouped as 14, 4 wouldn't actually be usable because it was redefined in line 2). As we said before 3 is still placed near the previous newline; we subtract 4 from it to get the previous position of 9 (if 3 is 63, our previous 9 was 59), then we compute the difference between the current and the previous 9 to know how many program-lines have passed since the last newline was printed. We add this value to the current 9, plus 10 because the next time we will want to print one more asterisk. Our 9 is now where we want to print the next newline, so we move 3 to the current position, it will then move 8 to where it's needed, just before 9.
Phew, that was long. And hard. No dirty jokes, please

Perl 6 (27)
{.say for '*' <<x<<(1..$_)}

tcl, 39
time {puts [string repe * [incr i]]} $n

demo

tcl, 46
while {[incr i]<=$n} {puts [string repe * $i]}

demo

JavaScript (ES6), 44 bytes
n=>[...Array(n)].map(_=>s+="*",s="").join`
`

If outputting as an array is permitted then subtract 8 bytes.
n=>[...Array(n)].map(_=>s+="*",s="")

Try it

f=
n=>[...Array(n)].map(_=>s+="*",s="").join`
`
oninput=_=>o.innerText=f(+i.value)
o.innerText=f(i.value=5)
<input id=i min=1 type=number>

Excel VBA, 37 Bytes
Anonymous VBE immediate window function that takes input from cell [A1] and outputs to range [B:B]
[B1].Resize([A1])="=Rept(""*"",Row())

RProgN 2, 5 bytes
²`**S

Outputs a stack of strings.
Explained
²`**S
²       # Define the function with the next two concepts, `* and * in this case.
    S   # Create a stack from 1 to the input, and execute the previous function on each element.
   *    # Multiply the element by
 `*     # The string "*", which repeats it. Output is implicit.

Try it online!

8th, 38 bytes
Code
( ( "*" . ) swap times cr ) 1 rot loop

SED (Stack Effect Diagram) is: n --
Example
ok> 5 ( ( "*" . ) swap times cr ) 1 rot loop
*
**
***
****
*****

J, 11 Bytes
$&'*'@>:@i.

Includes trialing spaces on every line.
Explanation:
$&'*'@>:@i.    | Full program
     @  @      | Verb conjunction characters, make sure it isn't executed as a hook
         i.    | Integers 0 to n-1
      >:       | Increment (Integers 1 to n)
$&'*'          | Reshape the array '*' to the size of each item by repeating it cyclically

Note that normally the dyadic ranks of $ are 1 _, so that $&'*' 1 2 3 would create a 1 by 2 by 3 array of '*'s. However, the @ cunjunction ensures that $&'*' is applied to each cell of it's argument.

https://codegolf.stackexchange.com/a/95868/74681

Dang, that's a much smarter approach! Good job :)

Oh, that's not my post.

Japt -R, 4 bytes
õç'*

Try it here

Julia 0.6, 13 bytes
n->"*".^(1:n)

^ is used for exponentiation and string repeating in Julia. This follows from the choice of '*' for string concatenation, which was chosen over '+' because addition is supposed to be commutative, and string concatenation is not. A function or operator preceded by . is "broadcasted", which in this case mean it is applied elementwise.
Outputs an array of strings. Depending on how the rules are interpreted it may need println.("*".^(1:n)) (23 bytes, meets any interpretation) or display("*".^(1:n)) (22 bytes, prints exact desired output plus an additional line about the array type) or "*".^(1:x).*"\n" (19 bytes, array of strings with newlines). Example of each in TIO.
Try it online!

Windows batch, 69 bytes
@set v=
@for /l %%G in (1,1,%1)do @call set v=*%%v%%&call echo %%v%%

Just putting an extra asterisk after each line.

brainfuck, 42 bytes
++++++++++<<,[>>[>]>--[<+>++++++]<-[.<]<-]

Try it online!
Takes the number as the char code of the input. Add two to avoid using negative cells, four to avoid wrapping.
How It Works:
Tape Format:  Input 0 10 * * * *...
++++++++++ Creates the newline cell
<<, Gets input
[ While input
 >>[>] Go to the end of the line of asterisks
 >--[<+>++++++]<- Add an asterisk to the end of the line
 [.<] Print the line including the newline
 <- Subtract one from the input
]

Pyt, 17 bytes
←ř↔0⇹Á`⑴67**Ƈǰƥłŕ

Explanation:
←                             Get input
 ř↔                           Push [input,input-1,...,1] onto stack
   0⇹                         Push 0, and flip the top two items on the stack
     Á                        Push contents of array onto stack
      `         ł             While top of stack is not 0, loop:
       ⑴                     Create an array of 1s with length equal to the top of the stack
         67**                 Multiply each element in the array by 42
             Ƈǰƥ              Convert to ASCII, join, and print; if top of stack is 0, exit loop
                 ŕ            Pop the 0

Try it online!

Stax, 4 bytes
m'**

Run and debug it

Noether, 14 bytes
I("*"i1+*P?!i)

Try it online

Keg, -pn, 8 bytes
Ï^⑷`*`*,

Try it online!
Explanation
Ï^

In the first part of the program, we push a range from 0 to n onto the stack. Then we reverse it because otherwise, the triangle is upside down.
⑷

We then start a mapping to the entire stack with the following:
    `*`*,

Which says to multiply the string * by the number being mapped and print it.

Erlang (escript), 50 bytes
s(0)->"";s(N)->s(N-1)++string:copies("*",N)++"~n".

Try it online!
Explanation
s(0)->"";    % If the current item is 0, return the empty string.
s(N)->       % Otherwise:
s(N-1)       % Return the N-1 string.
++string:copies("*",N).
             % Append "*" N times.
++"~n"       % Append a newline.

Powershell, 24 bytes
1.."$args"|%{$a+="*";$a}

try this Try it online!. watch out for this Try it online!

C++ (gcc), 65 bytes
#include<ios>
int f(int n){for(n&&f(n-1);~n;putchar(n--?42:10));}

Including the #include in the byte count.
Try it online!

You can shave off 8 bytes by just making it f(n){; int is implied as both parameter and return type.

Add++, 11 bytes
L,R"*"€*BFn

Try it online!
A function that returns the string given an argument \$n\$.
A full program is 17 bytes:
y:?
Ey,x:"*",*i,O

Try it online!
How they work
L,		; Define "anonymous" function
		; It takes one argument, e.g	5
	R	; Range			STACK = [[1 2 3 4 5]]
	"*"	; Push "*"		STACK = [[1 2 3 4 5] "*"]
	€	; For each i:
	 *	;   Repeat "*" i times	STACK = [["*" "**" "***" "****" "*****"]]
	BF	; Flatten		STACK = ["*" "**" "***" "****" "*****"]
	n	; Join by newlines	STACK = ['*\n**\n***\n****\n*****']
		; Return the top value

y:?		; y = input()
Ey,		; for i in range(y):
	x:"*",	;   x = "*"
	*i,	;   x *= i
	O	;   print(x)

Thunno d, \$9\log_{256}(96)\approx\$ 7.41 bytes
R{1+'**ZK

Attempt This Online! The slight misallignment on the third line of output is just ATO's formatting.
Explanation:
R{1+'**ZK   # Implicit input
R{          # Loop through range(0, input)
  1+        #  Add one
      *     #  Multiply this
    '*      #  With the string "*"
       ZK   #  Print
            # The d flag stops the implicit print at the end

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
Appease Your Google Overlords: Draw the "G" Logo
Write a program or function that takes in a positive integer N, and outputs an N×N pixel image of Google's "G" logo according to this* construction:

For example, if N is 400, a 400×400 pixel logo should be output, with correct dimensions and colors:

It should look accurate regardless of how large or small N is. e.g. here is N = 13:
Your code should not need to connect to the internet. For example, scaling an externally hosted svg is not allowed. (Scaling an svg encoded in your code would be fine though.)
Anti-aliasing may be used or not. It's up to you.
Notice that the horizontal bar of the "G" does not extend all the way to the right edge of the image. The circle curves normally inward on the right edge before it is cut off.
The shortest code in bytes wins.

* The construction of the logo has been simplified for this challenge. The correct construction can be seen here and here.

Is there a minimum N? A 1x1 image would likely produce unrecognizable output regardless of how good the solution is.

@jpmc26 N is a positive integer, so minimum 1. Of course a 1x1 image can't be recognizable, but "It should look accurate" meaning, e.g. a black image wouldn't make sense, even at that scale.

What's the expected output for a 1x1 image, then? A single pixel of any of the colors in the image? A white image? What about 2x2? There are still more colors in the image than pixels for that size. If any image is unacceptable at those scales, the challenge should define what is and is not acceptable, since you cannot produce an image even coming close to the correct appearance, shouldn't it? (If it were my challenge, I'd exclude them to keep it simple, but your decision. You would also need to verify that you don't exclude existing answers with the new specifications, I think.)

@jpmc26 No. People can use common sense to tell if a 1x1 or other small image looks accurate.

Are we permitted to download a pre-made .svg and encode it into our solution, or do we have to originally make it?

We need a TikZ answer!

Mathematica, 229 226 225 224 221 206 169 bytes
Thanks @MartinEnder for 1 byte, @ChipHurst for 37 bytes!
Graphics[{RGBColor@{"#EA4335","#FBBC05","#34A853","#4285F4"}[[#]],{0,-1}~Cuboid~{√24,1},Annulus[0{,},{3,5},{(2#-9)Pi/4,ArcCsc@5}]}&~Array~4,ImageSize->#,PlotRange->5]&

What a fun challenge!
Explanation
...&~Array~4

Iterate from 1 to 4...
RGBColor@{"#EA4335","#FBBC05","#34A853","#4285F4"}[[#]]

Convert the color hex codes to RGBColor objects, so that they can be applied to the Google logo graphic. Change the color palette to the <input>th color.
{0,-1}~Cuboid~{√24,1}

Create a filled rectangle (2D cuboid), whose diagonal corners are (0, -1) and (sqrt(24), 1).
Annulus[0{,},{3,5},{(2#-9)Pi/4,ArcCsc@5}]}

Generate four filled quarter-Annuluss, centered at the origin, with inner radius 3 and outer radius 5. Do not draw past ArcCsc@5 (where the blue segment ends).
Graphics[ ... , ImageSize->#,PlotRange->5]

Create a graphic with size N x N, from x = -5 to x = 5 (removes the padding).
Outputs
N = 10

N = 100

N = 200

N = 10000 (click image for full resolution)

C (Windows), 311 bytes
#include <windows.h>
main(int c,char**v){float x,y,a,b,N=atoi(*++v);HDC d=GetDC(GetDesktopWindow());for(x=0;x<N;x+=1)for(y=0;y<N;y+=1){a=2*x/N-1;b=2*y/N-1;SetPixel(d,x,y,(a>0&&a<.8&&b*b<.04)?0xF48542:(a*a+b*b>1||a*a+b*b<.36)?0xFFFFFF:(a*a<b*b)?((b<0)?3490794:5482548):(a<0)?376059:(b<-.2)?0xFFFFFF:0xF48542);}}

Takes "N" as command line argument and draws directly on the screen.
Un-golfed:
#include <windows.h>
// atoi() will work fine without any #include file!
// -> don't #include it!

main(int c,char **v)
{
    float x,y,a,b,N=atoi(*++v);

    /* Access the screen for directly drawing! */
    HDC d=GetDC(GetDesktopWindow());

    /* Iterate over the pixels */
    for(x=0;x<N;x+=1)
        for(y=0;y<N;y+=1)
    {
        /* Convert x,y into "relative" coordinates: The image
         * is 2.0x2.0 in size with (0.0,0.0) in the center */
        a=2*x/N-1;
        b=2*y/N-1;

        /* Draw each pixel */
        SetPixel(d,x,y,
            (a>0 && a<.8 && b*b<.04)?0xF48542: /* The bar of the "G" in the middle */
            (a*a+b*b>1 || a*a+b*b<.36)?0xFFFFFF: /* Not on one of the circle segments */
            (a*a<b*b)?((b<0)?0x3543EA:0x53A834): /* Top and bottom segments */
            (a<0)?0x5BCFB: /* Left segment */
            (b<-.2)?0xFFFFFF:0xF48542); /* Right segment: A bit more complicated... */
    }

    /* Note: Under good old Windows 3.x we would require to
     * call "ReleaseDC" here; otherwise the system would
     * "crash" (however the image would have been drawn!)
     * No need for this in modern Windows versions! */
}

You could keep 0xF48542 and 0xFFFFFF in integers.

What compiler/linker did you use? Doesn't work with mingw

@vsz Presumably, Visual Studio's compiler.

@vsz I can compile it with gcc g.c -lgdi32 on mingw.

Why use x+=1? Floats have operator++. Also, a,b will never reach 2.0 since x only goes up to N-1. You should divide by N-1.

@KarlNapf Thanks. I thought operator++ would only work with integers.

@TuukkaX In the original code I used hexadecimal (for better readability). Only in cases where decimal was shorter than hexadecimal (including the leading 0x) I replaced hexadecimal by decimal.

@MartinRosenau I was vague in my comment :D I meant keeping the values in variables.

you have to add 3 bytes for the /TC switch :*)

With your loops like this for(x=0;x<N;x+=1) could you not shorten them to something along the lines of for(x=0;N>++x;)

Also I think in C 0xFFFFFF can be shortened 2**24-1, I might be wrong though

-1>>8 may also work

@AlbertRenshaw No ** exponent operator in C :(

I'm not sure whether you missed my comment about keeping the large hexadecimals in integers and then using them. Should save a few bytes.

@TuukkaX you're right my bad! However I think ~0 would be 0xFFFFFF in hex, that would save him 12 bytes in this code (assuming ~0 auto casts to hex, I'd bet it does I can't test this though because I don't have windows.h on my mac)

Python 2, 244 220 bytes
using Martin Rosenau's transformation on the [-1,1]^2 plane and minor golfing like removing 0. or brackets
N=input()
R=[2*z/(N-1.)-1for z in range(N)]
B="\xFF"*3,"B\x85\xF4"
print"P6 %d %d 255 "%(N,N)+"".join([B[0<x<.8and.04>y*y],["4\xA8S",B[y>-.2],"\xFB\xBC\x05","\xEAC5"][(x>y)+2*(-x>y)]][.36<x*x+y*y<1]for y in R for x in R)

Explanation:
N=input()
R=[2*z/(N-1.)-1for z in range(N)]
#N*N points on the [-1,1]^2 plane

B="\xFF"*3,"B\x85\xF4"
#white and blue

print"P6 %d %d 255 "%(N,N) + "".join(
#binary PPM header
 [
  B[0<x<.8and.04>y*y],
  #blue rectangle part of the G, or white
  ["4\xA8S",B[y>-.2],"\xFB\xBC\x05","\xEAC5"][(x>y)+2*(-x>y)]
  #[green, [white,blue], yellow, red]-arcs with 4 way selector
 ]
 [.36<x*x+y*y<1]
 #radius checker, outside=0 blue rectangle or white, inside=1 colored arcs
  for y in R for x in R
  #for all points
 )

Output as binary PPM, usage:
python golf_google.py > google.ppm

Examples

13

50

100

1337

previous 244 bytes solution
N=input()
S="P6 %d %d 255 "%(N,N)
R=range(N)
B=["\xFF"*3,"B\x85\xF4"]
for Y in R:
 for X in R:y=Y-N/2;x=X-N/2;S+=[B[0<x<0.4*N and abs(y)<0.1*N],["4\xA8S",B[y>-0.1*N],"\xFB\xBC\x05","\xEAC5"][(x>y)+2*(-x>y)]][0.3*N<(y**2+x**2)**.5<0.5*N]
print S

Ungolfed beta Version before if/else elimination:
N=input()
print"P3 %d %d 255 "%(N,N)
R=range
M=N/2
r="255 0 0 "
g="0 255 0 "
b="0 0 255 "
c="255 255 0 "
w="255 255 255 "
for Y in R(N):
 for X in R(N):
  y=Y-M
  x=X-M
  d=(y**2+x**2)**.5 #radius
  if 0.3*N<d<0.5*N: #inside circle
   if x>y:          #diagonal cut bottom-left to top right
    if -x>y:        #other diagonal cut
     print r
    else:
     if y>-0.1*N:print b #leave some whitespace at blue
     else: print w
   else:
     if -x>y:
      print c
     else:
      print g
  else:
   if 0<x<0.4*N and -0.1*N<y<0.1*N: #the straight part of G
    print b
   else:
    print w

Hmm, not sure if 1for works.

@TuukkaX It does.

Can you include sample output?

@TuukkaX thanks for the 1for
@Cyoce sample output added

All the decimals in your code that are in the form of 0.x can be reduced to .x :)

@TuukkaX this is in the ungolfed beta version, the real code at the top is fine. I just posted this to show the progress from pure if/else to list/index

@KarlNapf Oh. I was accidentally looking at the previous 244 byte solution :D

You can save 6 bytes by using the actual Unicode characters "ÿ"*3,"B…ô" instead of hex escapes "\xFF"*3,"B\x85\xF4". The escapes use up so many bytes that they're longer than non-ASCII characters in bytes in UTF-8. (NB: The … is actually NEL.)

You can also save an additional 11 bytes by doing the same to "\xEAC5" - making it "êC5", making "4\xA8S" → "4¨S", and making "\xFB\xBC\x05" → "û¼␅". (Once again, the ␅ is actually ENQ.) EDIT: In Python 2, you have to declare encodings to include non-ASCII characters, so you'll need an additional 11 bytes for #coding:u8\n at the start. Still a loss of 6 bytes though.

JavaScript (ES6), 408 ... 321 317 bytes
384 383 371 367 359 327 316 308 304 bytes of JavaScript + 24 13 bytes for the canvas element

(f=d.style).width=f.height=(d.width=d.height=n=prompt(f.background='#FFF'))+'px';q=n/2;with(d.getContext`2d`)['#EA4335','#FBBC05','#34A853','#4285F4'].map((c,i)=>beginPath(lineWidth=y=n/5,strokeStyle=fillStyle=c,arc(q,q,z=q-y/2,(j=2*i+1)*(r=-.7854),(j+(i-3?2:1.256))*r,1),stroke(),fillRect(q,z,q*.98,y)))
<canvas id=d>

1 byte saved by drawing counter-clockwise.
11 bytes saved on the HTML thanks to Conor O'Brien.
12 bytes saved using with block thanks to Prinzhorn.
4 bytes saved with better use of z=q-y/2.
8 bytes saved by using parentNode and background thanks to Alexis Tyler.
32 bytes saved by using a more precise drawing of the blue arc/bar so I don't need to erase a part of it anymore.
11 bytes saved by setting canvas css instead of its parentNode thanks to Tejas Kale.
8 bytes saved using with and map with a single statement, `2d` instead of ('2d'), n/5 instead of .2*n and initializing the background in the prompt(...).
4 bytes saved replacing Math.PI/4 by .7854 which seems enough precision thanks to RobAu.

Explanation:
(f=d.style).width=f.height=(d.width=d.height=n=prompt(f.background='#FFF'))+'px';q=n/2

The canvas dimensions are initilized with user input and the background is set to white. q is initialized.
with(d.getContext`2d`)['#EA4335','#FBBC05','#34A853','#4285F4'].map((c,i)=>beginPath(lineWidth=y=n/5,strokeStyle=fillStyle=c,arc(q,q,z=q-y/2,(j=2*i+1)*(r=-.7854),(j+(i-3?2:1.256))*r,1),stroke(),fillRect(q,z,q*.98,y)))

For each color draws the circle part, with some adjustement for the last (blue) one. The bar is drawn for each color at the same place with the same dimensions so only the last (blue) one is visible.

<canvas id=d></canvas> should work, and <canvas id=d> might work.

@ConorO'Brien I tried edge, firefox and chrome, there are doing what's needed for <canvas id=d> to work, hopefully other browsers do too.

You can lose another 5 chars by replacing backgroundColor with background.

Also use d.parentNode instead of d.parentElement

Why are you setting the parentNode dimensions. Just d.style works too. Which allows (f = d.style).width = f.height = n = prompt() + 'px';

Wait a sec. (f = d.style).width = f.height = n = prompt() + 'px'; doesnt work. I thought it worked because I was reusing the older element.

@TejasKale you're right setting the style of the canvas works fine. I worked with the parentNode because it didn't seem to work with the canvas at the time.

You could use  .785398 instead of Math.PI/4 shaving off 2 bytes (or more if less precision is ok.

@RobAu I'm going for .7854. Since I didn't see any impacts on the 1500x1500 logo it should be fine.

with(d.getContext`2d`)['#EA4335','#FBBC05','#34A853','#4285F4'].map((c,i)=>beginPath(lineWidth=y=n/5,strokeStyle=fillStyle=c,arc(q=n/2,q,z=q-y/2,(j=2*i+1)*(r=-.7854),(j+(i-3?2:1.256))*r,1),stroke(),fillRect(q,z,q*.98,y)),fillRect(0,0,d.width=d.height=n=prompt(),n,fillStyle='#FFF')) saves 22 bytes. The f=d.style stuff for width and height is completely superfluous, and the .background part can be skipped if you call fillRect() instead. Other than that, everything else I left alone.

Setting the css width and height is redundant. You can just do d.width=d.height=n=prompt(d.style.background='#FFF'); Actually setting the background is redundant as well so just d.width=d.height=n=prompt(); That should save you 52 bytes.

BBC BASIC, 177 bytes
Download interpreter at http://www.bbcbasic.co.uk/bbcwin/download.html
I.n
V.19;16,234,67,53,275;64272;1468;531;16,43060;83,787;16,34114;7668;n;n;
F.t=1TO8.256S.1/n
a=t*PI/4y=n*SIN(a)x=n*COS(a)V.18;t-1>>1,25,85,x*.6;y*.6;25,85,x;y;
N.PLOT101,0,-n/5

BBC BASIC uses 2 units=1 pixel, so we plot a G of radius n units (=n/2 pixels) at centre n,n.
The idea is to plot a series of radial lines, changing colour as appropriate. It was found that there were small gaps between the lines due to truncation of the numbers when converted to pixels, so thin triangles are actually plotted instead.
Once the sweep of lines is completed, the cursor is at the top right corner of the blue area. A single coordinate for the diagonally opposite corner is given to draw a rectangle in order to complete the shape.
Ungolfed
INPUTn
REM reprogram pallette
VDU19;16,&EA,&43,&35,275;16,&FB,&BC,5,531;16,&34,&A8,&53,787;16,&42,&85,&F4
ORIGINn,n               :REM move origin to position n,n on screen.
FORt=1TO8.256STEP1/n    :REM from 1/8 turn to 8.56 turns in small steps
  GCOL0,t-1>>1          :REM set the colours, 0=red, 1=yellow, 2=green, 3=blue
  a=t*PI/4              :REM convert angle from 1/8 turns into radians
  y=n*SIN(a)            :REM find position of outer end of ray
  x=n*COS(a)            :REM plot to coordinates of inner and outer ends of ray
  PLOT85,x*.6,y*.6      :REM PLOT85 actually draws a triangle between the specified point
  PLOT85,x,y            :REM and the last two points visited.
NEXT
PLOT101,0,-n/5          :REM once all is over, cursor is at top right corner of blue rectangle. Draw a rectangle to the bottom left corner as specified.

Nice work!  I did mine in Logo using a similar method before I saw your answer.  You have me beaten by about 81 bytes.

HTML/JS, 680 624 bytes
To get 624 bytes, remove the last ;, this is needed for the snippet below due to the way it imports the HTML. Also, Firefox seems to not support image-rendering: pixelated and needs -moz-crisp-edges instead (thanks @alldayremix!) which makes a Firefox solution +7 but this does work in Chrome as expected.
Utilises JavaScript to request N and a

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Code that detects changes on itself
Challenge: Write a piece of code that only runs when the code is not being altered. If you change anything, the code should detect this and deny running. Of course, it should not be possible to just alter the detection mechanism (since this is a change in itself).

Welcome to PPCG! I'm afraid the specification of your challenge is missing a few details. For a start, all challenge need an objective winning criterion to determine which answer is best. However, even with that, it's not entirely clear what sort of changes are allowed. Surely, if I replace the entire program with print "Hello, World!" that's not possibly detectable. I recommend posting your idea in the sandbox so the community can help you flesh it out and turn this into a great challenge. :)

In addition to Martin's comment, this is a borderline dupe of Programming a Pristine World.