import 4.code.about;

class Header {

public void title() {

String fullTitle = '/sci/';
}

public void menu();

public void board();

public void goToBottom();

}
class Thread extends Board {
public void undefined(OP Anonymous) {

String fullTitle = 'undefined';
int postNumber = 16146039;
String image = '1714087296564388.png';
String date = '04/25/24(Thu)19:21:36';
String comment = 'hey, so I've been making a 3d editing software. I've been stuck on face extrusion for a day or so.
when I extrude a face (move it in a given direction and connect it with new polygons) some of the new quads end up facing the wrong direction (inwards). how can I detect this mathematically?

You can do the cross product to determine the quad's normal vector, but I honestly have no clue how to tell if the normal is correct. (of course visually it's quiet obvious when it's flipped) I tried taking the angle between the normal and the extrude direction but its always at 90 degrees, (never -90) so that's a dead end. you can check if the normal facing towards the 'center' of the shape or away. but that won't work for concave shapes'
;

}
public void comments() {
if(Anonymous && title=='undefined' && postNumber==16146100 && dateTime=='04/25/24(Thu)20:16:17') {

'>>16146039
compute normals of adjacent polys and set new polys' normals such that they have an inner product that is positive. if you interpret the new polys as a ribbon, then you only have to do the preceding calculation once for the first poly and then set the order of the points in the ribbon so that new polys have a normal consistent with the first one'
;

}

if(Anonymous && title=='undefined' && postNumber==16146119 && dateTime=='04/25/24(Thu)20:34:59') {

'>>16146039
dot product between the original face normal and the new face normals - positive, pointing in the same direction as the original'
;

}

if(Anonymous && title=='undefined' && postNumber==16147638 && dateTime=='04/26/24(Fri)19:52:52') {

'>>16146039
this is not science or math gtfo.'
;

}

}
}